Class: MotionForm::Section
- Inherits:
-
Object
- Object
- MotionForm::Section
- Defined in:
- lib/project/section/section.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #button(key, options = {}) ⇒ Object
-
#initialize(title = '') ⇒ Section
constructor
A new instance of Section.
- #input(key, options = {}) ⇒ Object
- #rows ⇒ Object
- #text(key, options = {}) ⇒ Object
Constructor Details
#initialize(title = '') ⇒ Section
Returns a new instance of Section.
9 10 11 |
# File 'lib/project/section/section.rb', line 9 def initialize(title = '') @title = title end |
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/project/section/section.rb', line 7 def title @title end |
Instance Method Details
#button(key, options = {}) ⇒ Object
21 22 23 |
# File 'lib/project/section/section.rb', line 21 def (key, = {}) rows << ButtonRow.new(key, ) end |
#input(key, options = {}) ⇒ Object
13 14 15 |
# File 'lib/project/section/section.rb', line 13 def input(key, = {}) rows << TextInputRow.new(key, ) end |
#rows ⇒ Object
25 26 27 |
# File 'lib/project/section/section.rb', line 25 def rows @rows ||= [] end |
#text(key, options = {}) ⇒ Object
17 18 19 |
# File 'lib/project/section/section.rb', line 17 def text(key, = {}) rows << TextFieldRow.new(key, ) end |