Class: Larynx::Form
Constant Summary
collapse
- @@setup =
nil
Instance Attribute Summary
Attributes inherited from Application
#call
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Fields
included
Methods inherited from Application
#initialize, #log, run
Class Method Details
.setup(&block) ⇒ Object
6
7
8
|
# File 'lib/larynx/form.rb', line 6
def self.setup(&block)
@@setup = block
end
|
Instance Method Details
15
16
17
18
|
# File 'lib/larynx/form.rb', line 15
def restart_form
@current_field = 0
run
end
|
#run ⇒ Object
10
11
12
13
|
# File 'lib/larynx/form.rb', line 10
def run
instance_eval &@@setup if @@setup
next_field
end
|