Class: QuickBlox::Configuration
- Inherits:
-
Object
- Object
- QuickBlox::Configuration
- Defined in:
- lib/quick_blox/configuration.rb
Instance Attribute Summary collapse
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#application_id ⇒ Object
Returns the value of attribute application_id.
-
#auth_key ⇒ Object
Returns the value of attribute auth_key.
-
#auth_secret ⇒ Object
Returns the value of attribute auth_secret.
-
#host ⇒ Object
Returns the value of attribute host.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #options=(options) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 |
# File 'lib/quick_blox/configuration.rb', line 9 def initialize @api_version = '0.1.0' end |
Instance Attribute Details
#api_version ⇒ Object
Returns the value of attribute api_version.
3 4 5 |
# File 'lib/quick_blox/configuration.rb', line 3 def api_version @api_version end |
#application_id ⇒ Object
Returns the value of attribute application_id.
3 4 5 |
# File 'lib/quick_blox/configuration.rb', line 3 def application_id @application_id end |
#auth_key ⇒ Object
Returns the value of attribute auth_key.
3 4 5 |
# File 'lib/quick_blox/configuration.rb', line 3 def auth_key @auth_key end |
#auth_secret ⇒ Object
Returns the value of attribute auth_secret.
3 4 5 |
# File 'lib/quick_blox/configuration.rb', line 3 def auth_secret @auth_secret end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/quick_blox/configuration.rb', line 3 def host @host end |
Instance Method Details
#options=(options) ⇒ Object
13 14 15 16 17 |
# File 'lib/quick_blox/configuration.rb', line 13 def () .each do |k,v| instance_variable_set(:"@#{k}",v) end end |
#to_hash ⇒ Object
19 20 21 |
# File 'lib/quick_blox/configuration.rb', line 19 def to_hash Hash[instance_variables.map { |name| [name.to_s.gsub("@","").to_sym, instance_variable_get(name)] } ] end |