Module: NPR::Concern::ShallowAttributes::ClassMethods

Defined in:
lib/npr/concern/shallow_attributes.rb

Overview


Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_shallow_attributesObject




33
34
35
# File 'lib/npr/concern/shallow_attributes.rb', line 33

def _shallow_attributes
  @shallow_attributes ||= []
end

Instance Method Details

#shallow_attribute(*attrs) ⇒ Object



26
27
28
29
# File 'lib/npr/concern/shallow_attributes.rb', line 26

def shallow_attribute(*attrs)
  _shallow_attributes.push *attrs
  attr_accessor *attrs
end