lib/ig_markets/model.rb
def deprecated_attribute(*names)
        names.each do |name|
          define_method(name) {}
          define_method("#{name}=") { |_value| }
          define_singleton_method("sanitize_#{name}_value") { |value| value }

          (@deprecated_attributes ||= []) << name
        end
      end
# Defines no-op setter, getter and sanitize methods for each of the passed attribute names. This is used to
# silently allow deprecated attributes to be used on the model but not have them be part of the model's structure.
#
# @param [Array<Symbol>] names The names of the deprecated attributes.
Defines no-op setter, getter and sanitize methods for each of the passed attribute names. This is used to
silently allow deprecated attributes to be used on the model but not have them be part of the model's structure.
Defines no - op setter getter and sanitize methods for each of the passed attribute names . This is used to silently allow deprecated attributes to be used on the model but not have them be part of the model ' s structure .
def deprecated_attribute(*names)
        names.each do |name|
          define_method(name) {}
          define_method("#{name}=") { |_value| }
          define_singleton_method("sanitize_#{name}_value") { |value| value }
          (@deprecated_attributes ||= []) << name
        end
      end
def deprecated_attribute ( * names ) names . each do | name | define_method ( name ) { } define_method ( "#{name}=" ) { | _value | } define_singleton_method ( "sanitize_#{name}_value" ) { | value | value } ( @deprecated_attributes ||= [ ] ) << name end end
Defines no-op setter, getter and sanitize methods for each of the passed attribute names.
Defines no - op setter getter and sanitize methods for each of the passed attribute names .
names
names The names of the deprecated attributes.
names The names of the deprecated attributes .