Module: ActiveModel::FormObject::ClassMethods

Defined in:
lib/active_model/form_object.rb

Instance Method Summary collapse

Instance Method Details

#model_nameObject



25
26
27
# File 'lib/active_model/form_object.rb', line 25

def model_name
  ActiveModel::Name.new(self, nil, self.name.split(/(?=[A-Z])/).first)
end

#new(*args, &block) ⇒ Object



19
20
21
22
23
# File 'lib/active_model/form_object.rb', line 19

def new(*args, &block)
  args = [{}] if args == []
  create_accessors(*args)
  allocate_and_init(*args, &block)
end