Class: Sinatra::FormHelpers::Fieldset
- Inherits:
-
Object
- Object
- Sinatra::FormHelpers::Fieldset
- Defined in:
- lib/sinatra/form_helpers.rb
Instance Method Summary collapse
-
#initialize(parent, name) ⇒ Fieldset
constructor
A new instance of Fieldset.
- #method_missing(meth, *args) ⇒ Object
Constructor Details
#initialize(parent, name) ⇒ Fieldset
Returns a new instance of Fieldset.
197 198 199 200 |
# File 'lib/sinatra/form_helpers.rb', line 197 def initialize(parent, name) @parent = parent @name = name.to_s.gsub(/\W+/,'') end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args) ⇒ Object
202 203 204 |
# File 'lib/sinatra/form_helpers.rb', line 202 def method_missing(meth, *args) @parent.send(meth, @name, *args) end |