Class: LunaPark::Forms::Simple
- Inherits:
-
Object
- Object
- LunaPark::Forms::Simple
- Includes:
- Extensions::Validatable
- Defined in:
- lib/luna_park/forms/simple.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 = {}) ⇒ Simple
constructor
A new instance of Simple.
- #submit ⇒ Object
Methods included from Extensions::Validatable
Constructor Details
#initialize(params = {}) ⇒ Simple
Returns a new instance of Simple.
46 47 48 |
# File 'lib/luna_park/forms/simple.rb', line 46 def initialize(params = {}) @params = params end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
44 45 46 |
# File 'lib/luna_park/forms/simple.rb', line 44 def result @result end |
Instance Method Details
#submit ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/luna_park/forms/simple.rb', line 50 def submit if valid? perform! true else false end end |