lib/ig_markets/model.rb
# Returns whether the passed value is a valid attribute name. If the passed attribute name is not recognized then
# an error will be printed to `stderr`. Only one warning will be printed for each unrecognized attribute.
#
# @param [Symbol] name The candidate attribute name.
#
# @return [Boolean]
Returns whether the passed value is a valid attribute name. If the passed attribute name is not recognized then
an error will be printed to `stderr`. Only one warning will be printed for each unrecognized attribute.
Returns whether the passed value is a valid attribute name . If the passed attribute name is not recognized then an error will be printed to ` stderr ` . Only one warning will be printed for each unrecognized attribute .
def valid_attribute?(name)
        return true if defined_attribute_names.include?(name) || Array(deprecated_attributes).include?(name)
        unless Array(@reported_invalid_attributes).include? name
          warn "ig_markets: unrecognized attribute #{self.name}##{name}"
          (@reported_invalid_attributes ||= []) << name
        end
        false
      end
def valid_attribute? ( name ) return true if defined_attribute_names . include? ( name ) || Array ( deprecated_attributes ) . include? ( name ) unless Array ( @reported_invalid_attributes ) . include? name warn "ig_markets: unrecognized attribute #{self.name}##{name}" ( @reported_invalid_attributes ||= [ ] ) << name end false end
Returns whether the passed value is a valid attribute name.
Returns whether the passed value is a valid attribute name .
None
Boolean
name
name The candidate attribute name.
name The candidate attribute name .