Module: Mudfly::Configuration
- Included in:
- Mudfly
- Defined in:
- lib/mudfly/configuration.rb
Constant Summary collapse
- VALID_CONFIGURATION_KEYS =
[:api_key, :user_agent, :endpoint, :locale]
- DEFAULT_API_KEY =
nil
- DEFAULT_USER_AGENT =
"Mudfly Ruby Gem #{Mudfly::VERSION}"
- DEFAULT_ENDPOINT =
'https://www.googleapis.com/pagespeedonline/v1/'
- DEFAULT_LOCALE =
'en_US'
Class Method Summary collapse
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Allow block configuration.
Class Method Details
.extended(base) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/mudfly/configuration.rb', line 17 def self.extended(base) base.api_key = DEFAULT_API_KEY base.user_agent = DEFAULT_USER_AGENT base.endpoint = DEFAULT_ENDPOINT base.locale = DEFAULT_LOCALE end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Allow block configuration
28 29 30 31 32 |
# File 'lib/mudfly/configuration.rb', line 28 def configure yield self end |