Class: Reform::Form::Forms
- Inherits:
-
Array
- Object
- Array
- Reform::Form::Forms
- Includes:
- ValidateMethods, Representable::Hash::Collection
- Defined in:
- lib/reform/form.rb
Overview
DISCUSS: this should be a Form subclass.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(ary, options) ⇒ Forms
constructor
A new instance of Forms.
-
#valid? ⇒ Boolean
TODO: make valid?(errors) the only public method.
Methods included from ValidateMethods
Constructor Details
#initialize(ary, options) ⇒ Forms
Returns a new instance of Forms.
272 273 274 275 |
# File 'lib/reform/form.rb', line 272 def initialize(ary, ) super(ary) @options = end |
Instance Method Details
#errors ⇒ Object
284 285 286 |
# File 'lib/reform/form.rb', line 284 def errors @errors ||= Form::Errors.new(self) end |
#valid? ⇒ Boolean
TODO: make valid?(errors) the only public method.
280 281 282 |
# File 'lib/reform/form.rb', line 280 def valid? res= validate_cardinality & validate_items end |