Class: Reflex::Configuration
- Inherits:
-
Object
- Object
- Reflex::Configuration
- Includes:
- Singleton
- Defined in:
- lib/reflex/configuration.rb
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#key ⇒ Object
Returns the value of attribute key.
-
#secret ⇒ Object
Returns the value of attribute secret.
Instance Method Summary collapse
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
8 9 10 |
# File 'lib/reflex/configuration.rb', line 8 def endpoint @endpoint end |
#key ⇒ Object
Returns the value of attribute key.
8 9 10 |
# File 'lib/reflex/configuration.rb', line 8 def key @key end |
#secret ⇒ Object
Returns the value of attribute secret.
8 9 10 |
# File 'lib/reflex/configuration.rb', line 8 def secret @secret end |
Instance Method Details
#hostname ⇒ Object
15 16 17 |
# File 'lib/reflex/configuration.rb', line 15 def hostname uri.host end |
#path ⇒ Object
19 20 21 |
# File 'lib/reflex/configuration.rb', line 19 def path uri.path end |
#port ⇒ Object
23 24 25 |
# File 'lib/reflex/configuration.rb', line 23 def port uri.port || 80 end |
#uri ⇒ Object
10 11 12 13 |
# File 'lib/reflex/configuration.rb', line 10 def uri @uri = URI.parse(endpoint) if @uri.nil? || @uri.to_s != endpoint @uri end |