Class: Push::Configuration::AMQP

Inherits:
Struct
  • Object
show all
Defined in:
lib/push/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



5
6
7
# File 'lib/push/configuration.rb', line 5

def host
  @host
end

#passwordObject

Returns the value of attribute password

Returns:

  • (Object)

    the current value of password



5
6
7
# File 'lib/push/configuration.rb', line 5

def password
  @password
end

#portObject

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



5
6
7
# File 'lib/push/configuration.rb', line 5

def port
  @port
end

#queue_ttlObject

Returns the value of attribute queue_ttl

Returns:

  • (Object)

    the current value of queue_ttl



5
6
7
# File 'lib/push/configuration.rb', line 5

def queue_ttl
  @queue_ttl
end

#usernameObject

Returns the value of attribute username

Returns:

  • (Object)

    the current value of username



5
6
7
# File 'lib/push/configuration.rb', line 5

def username
  @username
end

#vhostObject

Returns the value of attribute vhost

Returns:

  • (Object)

    the current value of vhost



5
6
7
# File 'lib/push/configuration.rb', line 5

def vhost
  @vhost
end

Instance Method Details

#to_hashObject



6
7
8
9
10
11
12
13
14
# File 'lib/push/configuration.rb', line 6

def to_hash
  {
    :host => Push.config.amqp.host,
    :port => Push.config.amqp.port,
    :user => Push.config.amqp.username,
    :pass => Push.config.amqp.password,
    :vhost => Push.config.amqp.vhost
  }
end