Class: LunaPark::Forms::SingleItem
- Inherits:
-
Object
- Object
- LunaPark::Forms::SingleItem
- Includes:
- Extensions::Attributable, Extensions::Validatable
- Defined in:
- lib/luna_park/forms/single_item.rb
Overview
Form object represents blank document, required to filled right, and can be performed
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ SingleItem
constructor
A new instance of SingleItem.
- #submit ⇒ Object
Methods included from Extensions::Validatable
Constructor Details
#initialize(params = {}) ⇒ SingleItem
Returns a new instance of SingleItem.
38 39 40 |
# File 'lib/luna_park/forms/single_item.rb', line 38 def initialize(params = {}) @params = params end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
36 37 38 |
# File 'lib/luna_park/forms/single_item.rb', line 36 def result @result end |
Instance Method Details
#submit ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/luna_park/forms/single_item.rb', line 42 def submit if valid? fill! perform! true else false end end |