Class: Mode::API::Form
- Inherits:
-
Object
- Object
- Mode::API::Form
- Defined in:
- lib/mode/api/form.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
- #action ⇒ Object
-
#initialize(content) ⇒ Form
constructor
A new instance of Form.
- #input(name) ⇒ Object
- #method ⇒ Object
- #submit!(params = {}) ⇒ Object
Constructor Details
#initialize(content) ⇒ Form
Returns a new instance of Form.
6 7 8 |
# File 'lib/mode/api/form.rb', line 6 def initialize(content) @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
4 5 6 |
# File 'lib/mode/api/form.rb', line 4 def content @content end |
Instance Method Details
#action ⇒ Object
14 15 16 |
# File 'lib/mode/api/form.rb', line 14 def action content['action'] end |
#input(name) ⇒ Object
18 19 20 |
# File 'lib/mode/api/form.rb', line 18 def input(name) content['input'][name] end |
#method ⇒ Object
10 11 12 |
# File 'lib/mode/api/form.rb', line 10 def method content['method'] end |