class Riveter::Presenter::Base

Public Class Methods

new(item, view=nil) click to toggle source
Calls superclass method
# File lib/riveter/presenter.rb, line 42
def initialize(item, view=nil)
  super(item)
  @view = view
end

Public Instance Methods

item() click to toggle source
# File lib/riveter/presenter.rb, line 38
def item
  __getobj__
end
method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/riveter/presenter.rb, line 47
def method_missing(method, *args, &block)
  return super if @view.nil?

  if respond_to_without_view?(method)
    super
  elsif @view.respond_to?(method)
    @view.send(method, *args, &block)
  else
    super
  end
end
respond_to_with_view?(method) click to toggle source
# File lib/riveter/presenter.rb, line 59
def respond_to_with_view?(method)
  respond_to_without_view?(method) || (!@view.nil? && @view.respond_to?(method))
end