Class: Terastream::Config
- Inherits:
-
Object
- Object
- Terastream::Config
- Defined in:
- lib/terastream/config.rb
Instance Attribute Summary collapse
-
#hostname ⇒ Object
Returns the value of attribute hostname.
-
#password ⇒ Object
Returns the value of attribute password.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
5 6 7 8 9 10 |
# File 'lib/terastream/config.rb', line 5 def initialize( = {}) @hostname = [:hostname] if [:hostname] @username = [:username] if [:username] @password = [:password] if [:password] @timeout = [:timeout] || 240 end |
Instance Attribute Details
#hostname ⇒ Object
Returns the value of attribute hostname.
3 4 5 |
# File 'lib/terastream/config.rb', line 3 def hostname @hostname end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/terastream/config.rb', line 3 def password @password end |
#timeout ⇒ Object
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/terastream/config.rb', line 3 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/terastream/config.rb', line 3 def username @username end |