Class: Terastream::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/terastream/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options = {})
  @hostname = options[:hostname] if options[:hostname]
  @username = options[:username] if options[:username]
  @password = options[:password] if options[:password]
  @timeout = options[:timeout] || 240
end

Instance Attribute Details

#hostnameObject

Returns the value of attribute hostname.



3
4
5
# File 'lib/terastream/config.rb', line 3

def hostname
  @hostname
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/terastream/config.rb', line 3

def password
  @password
end

#timeoutObject

Returns the value of attribute timeout.



3
4
5
# File 'lib/terastream/config.rb', line 3

def timeout
  @timeout
end

#usernameObject

Returns the value of attribute username.



3
4
5
# File 'lib/terastream/config.rb', line 3

def username
  @username
end