Class: Sinatra::FormHelpers::Fieldset

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/form_helpers.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, name) ⇒ Fieldset

Returns a new instance of Fieldset


213
214
215
216
# File 'lib/sinatra/form_helpers.rb', line 213

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


218
219
220
# File 'lib/sinatra/form_helpers.rb', line 218

def method_missing(meth, *args)
  @parent.send(meth, @name, *args)
end