lib/ig_markets/model.rb
# Converts this model into a nested hash of attributes. This is simlar to just calling {#attributes}, but in this
# case any attributes that are instances of {Model} will also be transformed into a hash in the return value.
#
# @return [Hash]
Converts this model into a nested hash of attributes. This is simlar to just calling {#attributes}, but in this
case any attributes that are instances of {Model} will also be transformed into a hash in the return value.
Converts this model into a nested hash of attributes . This is simlar to just calling { #attributes } but in this case any attributes that are instances of { Model } will also be transformed into a hash in the return value .
def to_h
      attributes.transform_values do |value|
        if value.is_a? Model
          value.to_h
        else
          value
        end
      end
    end
def to_h attributes . transform_values do | value | if value . is_a? Model value . to_h else value end end end
Converts this model into a nested hash of attributes.
Converts this model into a nested hash of attributes .
None
Hash