Class: Schema::Form
- Inherits:
-
Schema
- Object
- Schema
- Schema::Form
- Defined in:
- lib/formalist.rb
Instance Method Summary collapse
-
#initialize(rules = []) ⇒ Form
constructor
A new instance of Form.
Constructor Details
#initialize(rules = []) ⇒ Form
Returns a new instance of Form.
12 13 14 15 16 |
# File 'lib/formalist.rb', line 12 def initialize(rules = []) super # @input_type = InputTypeCompiler.new.(self.class.rules.map(&:to_ast)) @input_type = InputTypeCompiler.new.(self.class.rule_ast + rules.map(&:to_ast)) end |