Method: SubContext#method_missing

Defined in:
lib/volt/page/sub_context.rb

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

Raises:

  • (NoMethodError)


17
18
19
20
21
22
23
24
25
26
# File 'lib/volt/page/sub_context.rb', line 17

def method_missing(method_name, *args, &block)
  method_name = method_name.to_s
  if @locals.has_key?(method_name)
    return @locals[method_name]
  elsif @context
    return @context.send(method_name, *args, &block)
  end

  raise NoMethodError.new("undefined method `#{method_name}' for \"#{self.inspect}\":#{self.class.to_s}")
end