Class: WCC::Contentful::Configuration::FrozenConfiguration
- Inherits:
-
Object
- Object
- WCC::Contentful::Configuration::FrozenConfiguration
- Defined in:
- lib/wcc/contentful/configuration.rb
Instance Method Summary collapse
- #frozen? ⇒ Boolean
-
#initialize(configuration) ⇒ FrozenConfiguration
constructor
A new instance of FrozenConfiguration.
-
#master? ⇒ Boolean
Returns true if the currently configured environment is pointing at ‘master`.
Constructor Details
#initialize(configuration) ⇒ FrozenConfiguration
Returns a new instance of FrozenConfiguration.
262 263 264 265 266 267 268 |
# File 'lib/wcc/contentful/configuration.rb', line 262 def initialize(configuration) ATTRIBUTES.each do |att| val = configuration.public_send(att) val = val.dup.freeze if val.is_a?(Hash) || val.is_a?(Array) instance_variable_set("@#{att}", val) end end |
Instance Method Details
#frozen? ⇒ Boolean
275 276 277 |
# File 'lib/wcc/contentful/configuration.rb', line 275 def frozen? true end |
#master? ⇒ Boolean
Returns true if the currently configured environment is pointing at ‘master`.
271 272 273 |
# File 'lib/wcc/contentful/configuration.rb', line 271 def master? !environment.present? end |