Module: Showbuilder::Builders::TemplateMethods

Included in:
FormBuilder, ModelFormBuilder, ModelViewBuilder, ShowModelTableRowBuilder
Defined in:
lib/showbuilder/builders/template_methods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



6
7
8
9
10
11
12
# File 'lib/showbuilder/builders/template_methods.rb', line 6

def method_missing(method_name, *args, &block)
  if self.template.respond_to?(method_name)
    self.template.send(method_name, *args, &block)
  else
    raise NoMethodError.new("#{self} not has a method, that is #{method_name}.", method_name, args)
  end
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template.



4
5
6
# File 'lib/showbuilder/builders/template_methods.rb', line 4

def template
  @template
end