lib/ruby-lokalise-api/resources/base.rb
def inherited(subclass)
          klass_attributes = attributes_for subclass
          subclass.class_exec do
            const_set :ATTRIBUTES, klass_attributes
            attr_reader(*klass_attributes)
          end
          super
        end
# Dynamically adds attribute readers for each inherited class.
# Attributes are defined in the `data/attributes.json` file.
# Also sets the `ATTRIBUTES` constant to assign values to each attribute later when
# the response arrives from the API
Dynamically adds attribute readers for each inherited class.
Attributes are defined in the `data/attributes.json` file.
Also sets the `ATTRIBUTES` constant to assign values to each attribute later when
the response arrives from the API
Dynamically adds attribute readers for each inherited class . Attributes are defined in the ` data / attributes . json ` file . Also sets the ` ATTRIBUTES ` constant to assign values to each attribute later when the response arrives from the API
def inherited(subclass)
          klass_attributes = attributes_for subclass
          subclass.class_exec do
            const_set :ATTRIBUTES, klass_attributes
            attr_reader(*klass_attributes)
          end
          super
        end
def inherited ( subclass ) klass_attributes = attributes_for subclass subclass . class_exec do const_set :ATTRIBUTES , klass_attributes attr_reader ( * klass_attributes ) end super end
Dynamically adds attribute readers for each inherited class.
Dynamically adds attribute readers for each inherited class .
subclass