Class: FastlyRails::Configuration
- Inherits:
-
Object
- Object
- FastlyRails::Configuration
- Defined in:
- lib/fastly-rails/configuration.rb
Constant Summary collapse
- MAX_AGE_DEFAULT =
30 days
'2592000'
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#max_age ⇒ Object
Returns the value of attribute max_age.
-
#password ⇒ Object
Returns the value of attribute password.
-
#service_id ⇒ Object
Returns the value of attribute service_id.
-
#user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Instance Method Summary collapse
- #authenticatable? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #invalid_service_id? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 |
# File 'lib/fastly-rails/configuration.rb', line 12 def initialize @max_age = MAX_AGE_DEFAULT end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/fastly-rails/configuration.rb', line 6 def api_key @api_key end |
#max_age ⇒ Object
Returns the value of attribute max_age.
6 7 8 |
# File 'lib/fastly-rails/configuration.rb', line 6 def max_age @max_age end |
#password ⇒ Object
Returns the value of attribute password.
6 7 8 |
# File 'lib/fastly-rails/configuration.rb', line 6 def password @password end |
#service_id ⇒ Object
Returns the value of attribute service_id.
6 7 8 |
# File 'lib/fastly-rails/configuration.rb', line 6 def service_id @service_id end |
#user ⇒ Object
Returns the value of attribute user.
6 7 8 |
# File 'lib/fastly-rails/configuration.rb', line 6 def user @user end |
Class Method Details
.max_age_default ⇒ Object
8 9 10 |
# File 'lib/fastly-rails/configuration.rb', line 8 def self.max_age_default MAX_AGE_DEFAULT end |
Instance Method Details
#authenticatable? ⇒ Boolean
16 17 18 |
# File 'lib/fastly-rails/configuration.rb', line 16 def authenticatable? !!(api_key || has_credentials?) end |
#invalid_service_id? ⇒ Boolean
20 21 22 |
# File 'lib/fastly-rails/configuration.rb', line 20 def invalid_service_id? service_id_nil? || service_id_blank? end |