Class: WCC::Contentful::App::Configuration::FrozenConfiguration
- Inherits:
- 
      Object
      
        - Object
- WCC::Contentful::App::Configuration::FrozenConfiguration
 
- Defined in:
- lib/wcc/contentful/app/configuration.rb
Instance Attribute Summary collapse
- 
  
    
      #wcc_contentful_config  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute wcc_contentful_config. 
Instance Method Summary collapse
- #frozen? ⇒ Boolean
- 
  
    
      #initialize(configuration, frozen_wcc_contentful_config)  ⇒ FrozenConfiguration 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of FrozenConfiguration. 
Constructor Details
#initialize(configuration, frozen_wcc_contentful_config) ⇒ FrozenConfiguration
Returns a new instance of FrozenConfiguration.
| 42 43 44 45 46 47 48 49 50 51 52 53 54 | # File 'lib/wcc/contentful/app/configuration.rb', line 42 def initialize(configuration, frozen_wcc_contentful_config) unless frozen_wcc_contentful_config.frozen? raise ArgumentError, 'Please first freeze the wcc_contentful_config' end @wcc_contentful_config = frozen_wcc_contentful_config ATTRIBUTES.each do |att| val = configuration.public_send(att) val.freeze if val.respond_to?(:freeze) instance_variable_set("@#{att}", val) end end | 
Instance Attribute Details
#wcc_contentful_config ⇒ Object (readonly)
Returns the value of attribute wcc_contentful_config.
| 38 39 40 | # File 'lib/wcc/contentful/app/configuration.rb', line 38 def wcc_contentful_config @wcc_contentful_config end | 
Instance Method Details
#frozen? ⇒ Boolean
| 56 57 58 | # File 'lib/wcc/contentful/app/configuration.rb', line 56 def frozen? true end |