Class: Fabulous::Configuration
- Inherits:
-
Object
- Object
- Fabulous::Configuration
- Defined in:
- lib/fabulous/configuration.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#password ⇒ Object
Returns the value of attribute password.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 10 11 |
# File 'lib/fabulous/configuration.rb', line 7 def initialize @base_url = "https://api.fabulous.com" @timeout = 30 @open_timeout = 10 end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
5 6 7 |
# File 'lib/fabulous/configuration.rb', line 5 def base_url @base_url end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
5 6 7 |
# File 'lib/fabulous/configuration.rb', line 5 def open_timeout @open_timeout end |
#password ⇒ Object
Returns the value of attribute password.
5 6 7 |
# File 'lib/fabulous/configuration.rb', line 5 def password @password end |
#timeout ⇒ Object
Returns the value of attribute timeout.
5 6 7 |
# File 'lib/fabulous/configuration.rb', line 5 def timeout @timeout end |
#username ⇒ Object
Returns the value of attribute username.
5 6 7 |
# File 'lib/fabulous/configuration.rb', line 5 def username @username end |
Instance Method Details
#valid? ⇒ Boolean
13 14 15 |
# File 'lib/fabulous/configuration.rb', line 13 def valid? !username.nil? && !password.nil? end |