Class: Leadcli::Configuration
- Inherits:
-
Object
- Object
- Leadcli::Configuration
- Defined in:
- lib/leadcli/configuration.rb
Instance Attribute Summary collapse
-
#host ⇒ Object
Returns the value of attribute host.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#port ⇒ Object
Returns the value of attribute port.
-
#secure ⇒ Object
Returns the value of attribute secure.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
- #defaults ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 |
# File 'lib/leadcli/configuration.rb', line 10 def initialize defaults.each do |setting, value| send("#{setting}=", value) end end |
Instance Attribute Details
#host ⇒ Object
Returns the value of attribute host.
4 5 6 |
# File 'lib/leadcli/configuration.rb', line 4 def host @host end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/leadcli/configuration.rb', line 8 def logger @logger end |
#port ⇒ Object
Returns the value of attribute port.
5 6 7 |
# File 'lib/leadcli/configuration.rb', line 5 def port @port end |
#secure ⇒ Object
Returns the value of attribute secure.
6 7 8 |
# File 'lib/leadcli/configuration.rb', line 6 def secure @secure end |
#token ⇒ Object
Returns the value of attribute token.
7 8 9 |
# File 'lib/leadcli/configuration.rb', line 7 def token @token end |
Instance Method Details
#defaults ⇒ Object
16 17 18 19 20 21 |
# File 'lib/leadcli/configuration.rb', line 16 def defaults defaults = { :host => 'new.eureo-tools.com' } #defaults[:logger] = Logger.new(STDOUT) end |