Class: MQRPC::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/mqrpc/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Config

Returns a new instance of Config.



10
11
12
13
14
15
16
17
# File 'lib/mqrpc/config.rb', line 10

def initialize(options = {})
  @mqhost = options["mqhost"] || "localhost"
  @mqport = options["mqport"] || 5672
  @mquser = options["mquser"] || "guest"
  @mqpass = options["mqpass"] || "guest"
  @mqvhost = options["mqvhost"] || "/"
  @mqexchange = options["mqexchange"] || "mqrpc.topic"
end

Instance Attribute Details

#mqexchangeObject (readonly)

Returns the value of attribute mqexchange.



8
9
10
# File 'lib/mqrpc/config.rb', line 8

def mqexchange
  @mqexchange
end

#mqhostObject (readonly)

Returns the value of attribute mqhost.



3
4
5
# File 'lib/mqrpc/config.rb', line 3

def mqhost
  @mqhost
end

#mqpassObject (readonly)

Returns the value of attribute mqpass.



6
7
8
# File 'lib/mqrpc/config.rb', line 6

def mqpass
  @mqpass
end

#mqportObject (readonly)

Returns the value of attribute mqport.



4
5
6
# File 'lib/mqrpc/config.rb', line 4

def mqport
  @mqport
end

#mquserObject (readonly)

Returns the value of attribute mquser.



5
6
7
# File 'lib/mqrpc/config.rb', line 5

def mquser
  @mquser
end

#mqvhostObject (readonly)

Returns the value of attribute mqvhost.



7
8
9
# File 'lib/mqrpc/config.rb', line 7

def mqvhost
  @mqvhost
end