Module: ActiveModel::FormObject::ClassMethods

Defined in:
lib/active_model/form_object.rb

Instance Method Summary collapse

Instance Method Details

#model_nameObject



28
29
30
# File 'lib/active_model/form_object.rb', line 28

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

#new(*args, &block) ⇒ Object



22
23
24
25
26
# File 'lib/active_model/form_object.rb', line 22

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