Class: Shoutbox::Configuration
- Inherits:
-
Object
- Object
- Shoutbox::Configuration
- Defined in:
- lib/shoutbox/configuration.rb
Instance Attribute Summary collapse
-
#auth_token ⇒ Object
Returns the value of attribute auth_token.
-
#default_group ⇒ Object
Returns the value of attribute default_group.
-
#host ⇒ Object
Returns the value of attribute host.
-
#proxy_host ⇒ Object
Returns the value of attribute proxy_host.
-
#proxy_port ⇒ Object
Returns the value of attribute proxy_port.
Instance Method Summary collapse
- #config_file=(filename) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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_token ⇒ Object
Returns the value of attribute auth_token.
3 4 5 |
# File 'lib/shoutbox/configuration.rb', line 3 def auth_token @auth_token end |
#default_group ⇒ Object
Returns the value of attribute default_group.
3 4 5 |
# File 'lib/shoutbox/configuration.rb', line 3 def default_group @default_group end |
#host ⇒ Object
Returns the value of attribute host.
3 4 5 |
# File 'lib/shoutbox/configuration.rb', line 3 def host @host end |
#proxy_host ⇒ Object
Returns the value of attribute proxy_host.
3 4 5 |
# File 'lib/shoutbox/configuration.rb', line 3 def proxy_host @proxy_host end |
#proxy_port ⇒ Object
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 |