Module: ObjectAttorney::Serialization::ClassMethods
- Defined in:
- lib/object_attorney/serialization.rb
Instance Method Summary collapse
Instance Method Details
#add_attribute_key(*getters) ⇒ Object
35 36 37 |
# File 'lib/object_attorney/serialization.rb', line 35 def add_attribute_key(*getters) attributes_keys.push(*getters) unless attributes_keys.include?(getters) end |
#attributes_keys ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/object_attorney/serialization.rb', line 27 def attributes_keys return @attributes_keys if defined?(@attributes_keys) @attributes_keys = zuper_method(:attributes_keys) @attributes_keys ||= represented_object_class.present? && represented_object_class.method_defined?(:id) ? [:id] : [] end |