Class: ThriftyBunny::Config
- Inherits:
-
Object
- Object
- ThriftyBunny::Config
- Defined in:
- lib/thrifty_bunny/config.rb
Instance Attribute Summary collapse
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
-
#ssl ⇒ Object
readonly
Returns the value of attribute ssl.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
-
#vhost ⇒ Object
readonly
Returns the value of attribute vhost.
Instance Method Summary collapse
- #bunny_config ⇒ Object
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/thrifty_bunny/config.rb', line 7 def initialize(={}) @host = [:host] || '127.0.0.1' @port = [:port] || 5672 @vhost = [:vhost] || "/" @user = [:user] || "guest" @password = [:password] || "guest" @ssl = [:ssl] || false @queue = [:queue] || 'rpc_queue' @exchange = [:exchange] || 'rpc_exchange' end |
Instance Attribute Details
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def exchange @exchange end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def host @host end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def password @password end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def port @port end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def queue @queue end |
#ssl ⇒ Object (readonly)
Returns the value of attribute ssl.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def ssl @ssl end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def user @user end |
#vhost ⇒ Object (readonly)
Returns the value of attribute vhost.
5 6 7 |
# File 'lib/thrifty_bunny/config.rb', line 5 def vhost @vhost end |
Instance Method Details
#bunny_config ⇒ Object
20 21 22 23 24 25 |
# File 'lib/thrifty_bunny/config.rb', line 20 def bunny_config { host: host, port: port, vhost: vhost, user: user, password: password, ssl: ssl } end |