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


209
210
211
212
# File 'lib/sinatra/form_helpers.rb', line 209

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


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

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