Method: PDC::Resource::Attributes::ClassMethods#attributes

Defined in:
lib/pdc/resource/attributes.rb

#attributes(*names) ⇒ Object

define attributes on Model using attributes :attribute_name, attribute_name_2 …



15
16
17
18
19
# File 'lib/pdc/resource/attributes.rb', line 15

def attributes(*names)
  return .keys if names.empty?
  names.each { |n| [n] ||=  }
  define_methods_in_container(names)
end