Method: SimpleFormObject::ClassMethods#attribute

Defined in:
lib/simple_form_object.rb

#attribute(name, type = :string, options = {}) ⇒ Object



12
13
14
15
16
# File 'lib/simple_form_object.rb', line 12

def attribute(name, type = :string, options = {})
  self.send(:attr_accessor, name)

  _attributes << Attribute.new(name, options, type)
end