module Mobility::Plugins::Attributes::ClassMethods
Public Instance Methods
inherited(klass)
click to toggle source
Calls superclass method
# File lib/mobility/plugins/attributes.rb, line 54 def inherited(klass) super attrs = mobility_attributes.freeze # ensure attributes are not modified after being inherited klass.class_eval { @mobility_attributes = attrs.dup } end
mobility_attribute?(name)
click to toggle source
Return true if attribute name is translated on this model. @param [String, Symbol] Attribute name @return [Boolean]
# File lib/mobility/plugins/attributes.rb, line 44 def mobility_attribute?(name) mobility_attributes.include?(name.to_s) end
mobility_attributes()
click to toggle source
Return translated attribute names on this model. @return [Array<String>] Attribute names
# File lib/mobility/plugins/attributes.rb, line 50 def mobility_attributes @mobility_attributes ||= [] end