Module: ActForm::Schema::ClassMethods

Defined in:
lib/act_form/schema.rb

Overview

rubocop:disable Style/Documentation

Instance Method Summary collapse

Instance Method Details

#contractObject



13
14
15
# File 'lib/act_form/schema.rb', line 13

def contract
  self._schema.ins
end

#params(*parents, &block) ⇒ Object



17
18
19
20
# File 'lib/act_form/schema.rb', line 17

def params(*parents, &block)
  self._schema = Base.new(*parents, &block)
  self._schema.each { |k, opts| self.attribute(k, **opts) }
end