Class: Shoutbox::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



5
6
7
# File 'lib/shoutbox/configuration.rb', line 5

def initialize
  config_file_exists? ? read_config_file : default_config
end

Instance Attribute Details

#auth_tokenObject

Returns the value of attribute auth_token.



3
4
5
# File 'lib/shoutbox/configuration.rb', line 3

def auth_token
  @auth_token
end

#default_groupObject

Returns the value of attribute default_group.



3
4
5
# File 'lib/shoutbox/configuration.rb', line 3

def default_group
  @default_group
end

#hostObject

Returns the value of attribute host.



3
4
5
# File 'lib/shoutbox/configuration.rb', line 3

def host
  @host
end

#proxy_hostObject

Returns the value of attribute proxy_host.



3
4
5
# File 'lib/shoutbox/configuration.rb', line 3

def proxy_host
  @proxy_host
end

#proxy_portObject

Returns the value of attribute proxy_port.



3
4
5
# File 'lib/shoutbox/configuration.rb', line 3

def proxy_port
  @proxy_port
end

Instance Method Details

#config_file=(filename) ⇒ Object



9
10
11
12
# File 'lib/shoutbox/configuration.rb', line 9

def config_file=( filename )
  @config_file = filename
  config_file_exists? ? read_config_file : default_config
end