Class: Minimal::Template::FormBuilderProxy::Proxy

Inherits:
Object
  • Object
show all
Defined in:
lib/minimal/template/form_builder_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template, builder) ⇒ Proxy

Returns a new instance of Proxy.



6
7
8
# File 'lib/minimal/template/form_builder_proxy.rb', line 6

def initialize(template, builder)
  @template, @builder = template, builder
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



10
11
12
# File 'lib/minimal/template/form_builder_proxy.rb', line 10

def method_missing(method, *args, &block)
  template << builder.send(method, *args, &block)
end

Instance Attribute Details

#builderObject (readonly)

Returns the value of attribute builder.



4
5
6
# File 'lib/minimal/template/form_builder_proxy.rb', line 4

def builder
  @builder
end

#templateObject (readonly)

Returns the value of attribute template.



4
5
6
# File 'lib/minimal/template/form_builder_proxy.rb', line 4

def template
  @template
end