Class: Netvisor::Configuration
- Inherits:
-
Struct
- Object
- Struct
- Netvisor::Configuration
- Defined in:
- lib/netvisor/configuration.rb
Instance Attribute Summary collapse
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#customer_key ⇒ Object
Returns the value of attribute customer_key.
-
#host ⇒ Object
Returns the value of attribute host.
-
#language ⇒ Object
Returns the value of attribute language.
-
#organisation_id ⇒ Object
Returns the value of attribute organisation_id.
-
#partner_id ⇒ Object
Returns the value of attribute partner_id.
-
#partner_key ⇒ Object
Returns the value of attribute partner_key.
-
#sender ⇒ Object
Returns the value of attribute sender.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Configuration
constructor
Initialize override to accept named parameters (Config(:host => ‘foo’…)) stackoverflow.com/questions/5407940/named-parameters-in-ruby-structs.
Constructor Details
#initialize(*args) ⇒ Configuration
Initialize override to accept named parameters (Config(:host => ‘foo’…)) stackoverflow.com/questions/5407940/named-parameters-in-ruby-structs
14 15 16 17 18 19 |
# File 'lib/netvisor/configuration.rb', line 14 def initialize *args return super unless (args.length == 1 and args.first.instance_of? Hash) args.first.each_pair do |k, v| self[k] = v if members.map {|x| x.intern}.include? k end end |
Instance Attribute Details
#customer_id ⇒ Object
Returns the value of attribute customer_id
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def customer_id @customer_id end |
#customer_key ⇒ Object
Returns the value of attribute customer_key
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def customer_key @customer_key end |
#host ⇒ Object
Returns the value of attribute host
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def host @host end |
#language ⇒ Object
Returns the value of attribute language
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def language @language end |
#organisation_id ⇒ Object
Returns the value of attribute organisation_id
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def organisation_id @organisation_id end |
#partner_id ⇒ Object
Returns the value of attribute partner_id
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def partner_id @partner_id end |
#partner_key ⇒ Object
Returns the value of attribute partner_key
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def partner_key @partner_key end |
#sender ⇒ Object
Returns the value of attribute sender
2 3 4 |
# File 'lib/netvisor/configuration.rb', line 2 def sender @sender end |