lib/site-object/site.rb
# In cases where the site object doesn't recognize a method it will try to delegate the method call
# to the page that's currently being displayed in the browser, assuming that the site object recognizes
# the page by its URL. If the page is the last visited page and method is unique, (i.e., doesn't belong
# to any other page object) then the site object won't attempt to regenerate the page when calling
# the method.
In cases where the site object doesn't recognize a method it will try to delegate the method call
to the page that's currently being displayed in the browser, assuming that the site object recognizes
the page by its URL. If the page is the last visited page and method is unique,  then the site object won't attempt to regenerate the page when calling
the method.
In cases where the site object doesn ' t recognize a method it will try to delegate the method call to the page that ' s currently being displayed in the browser assuming that the site object recognizes the page by its URL . If the page is the last visited page and method is unique then the site object won ' t attempt to regenerate the page when calling the method .
def method_missing(sym, *args, &block)
    if @unique_methods.include?(sym) && @most_recent_page.respond_to?(sym)
      if args && block
        @most_recent_page.send(sym, *args, &block)
      elsif args
        @most_recent_page.send(sym, *args)
      elsif block
        @most_recent_page.send(sym, &block)
      else
        @most_recent_page.send sym
      end
    elsif p = page
      if p.respond_to?(sym)
        if args && block
           p.send(sym, *args, &block)
        elsif args
          p.send(sym, *args)
        elsif block
          p.send(sym, &block)
        else
          p.send sym
        end
      else
        super
      end
    else
      super
    end
  end
def method_missing ( sym , * args , & block ) if @unique_methods . include? ( sym ) && @most_recent_page . respond_to? ( sym ) if args && block @most_recent_page . send ( sym , * args , & block ) elsif args @most_recent_page . send ( sym , * args ) elsif block @most_recent_page . send ( sym , & block ) else @most_recent_page . send sym end elsif p = page if p . respond_to? ( sym ) if args && block p . send ( sym , * args , & block ) elsif args p . send ( sym , * args ) elsif block p . send ( sym , & block ) else p . send sym end else super end else super end end
In cases where the site object doesn't recognize a method it will try to delegate the method call
to the page that's currently being displayed in the browser, assuming that the site object recognizes
the page by its URL.
In cases where the site object doesn ' t recognize a method it will try to delegate the method call to the page that ' s currently being displayed in the browser assuming that the site object recognizes the page by its URL .
sym
<not_specific>
args
<not_specific>
block
<not_specific>