Class: Netvisor::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject

Returns the value of attribute customer_id

Returns:

  • (Object)

    the current value of customer_id



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def customer_id
  @customer_id
end

#customer_keyObject

Returns the value of attribute customer_key

Returns:

  • (Object)

    the current value of customer_key



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def customer_key
  @customer_key
end

#hostObject

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def host
  @host
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def language
  @language
end

#organisation_idObject

Returns the value of attribute organisation_id

Returns:

  • (Object)

    the current value of organisation_id



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def organisation_id
  @organisation_id
end

#partner_idObject

Returns the value of attribute partner_id

Returns:

  • (Object)

    the current value of partner_id



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def partner_id
  @partner_id
end

#partner_keyObject

Returns the value of attribute partner_key

Returns:

  • (Object)

    the current value of partner_key



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def partner_key
  @partner_key
end

#senderObject

Returns the value of attribute sender

Returns:

  • (Object)

    the current value of sender



2
3
4
# File 'lib/netvisor/configuration.rb', line 2

def sender
  @sender
end