Class: AtlasEngine::CountryProfileSubsetBase

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
app/models/atlas_engine/country_profile_subset_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash:) ⇒ CountryProfileSubsetBase

Returns a new instance of CountryProfileSubsetBase.



12
13
14
15
16
17
18
19
20
# File 'app/models/atlas_engine/country_profile_subset_base.rb', line 12

def initialize(hash:)
  @attributes = hash

  attributes.keys.each do |key|
    define_singleton_method(key.to_s) do
      @attributes[key]
    end unless respond_to?(key.to_s)
  end
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



9
10
11
# File 'app/models/atlas_engine/country_profile_subset_base.rb', line 9

def attributes
  @attributes
end