Class: StackAgent::Configuration
- Inherits:
-
Object
- Object
- StackAgent::Configuration
- Defined in:
- lib/stack-agent/configuration.rb
Constant Summary collapse
- DEFAULT_API_HOST =
'https://stackotron-discover.herokuapp.com'
Instance Attribute Summary collapse
-
#api_host ⇒ Object
Returns the value of attribute api_host.
-
#app_token ⇒ Object
Returns the value of attribute app_token.
-
#group ⇒ Object
Returns the value of attribute group.
-
#name ⇒ Object
Returns the value of attribute name.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/stack-agent/configuration.rb', line 13 def initialize @api_host = DEFAULT_API_HOST @name = Socket.gethostname # If we're running inside rails, attempt to fill in a bunch of the blanks if defined?(Rails) && Rails.env.development? @group = 'Development' @uri = "http://#{ip}:#{port}" if port end end |
Instance Attribute Details
#api_host ⇒ Object
Returns the value of attribute api_host.
7 8 9 |
# File 'lib/stack-agent/configuration.rb', line 7 def api_host @api_host end |
#app_token ⇒ Object
Returns the value of attribute app_token.
8 9 10 |
# File 'lib/stack-agent/configuration.rb', line 8 def app_token @app_token end |
#group ⇒ Object
Returns the value of attribute group.
10 11 12 |
# File 'lib/stack-agent/configuration.rb', line 10 def group @group end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/stack-agent/configuration.rb', line 9 def name @name end |
#uri ⇒ Object
Returns the value of attribute uri.
11 12 13 |
# File 'lib/stack-agent/configuration.rb', line 11 def uri @uri end |