Sha256: 15e70a2d3d798a9203c97b37e1196a2a6959b2005127a394b42c023c4def27ce

Contents?: true

Size: 838 Bytes

Versions: 10

Compression:

Stored size: 838 Bytes

Contents

require 'spiderfw/controller/controller'

module Spider

    class PageController < Controller
        include Visual
        include WidgetHelper
        include HTTPMixin
        include StaticContent

        def initialize(request, response, scene=nil)
            super
            @widgets = {}
        end
        
        
        def get_route(path)
            if (path =~ /^[^:]+:([^:\/]+)[:\/]?(.*)$/) # route to widgets
                if (@widgets[$1])
                    return Route.new(:path => path, :dest => @widgets[$1], :action => $2)
                end
            end
            return super
        end
        
        # 
        # def render(path=nil, scene=nil)
        #     scene ||= @scene
        #     scene[:widgets] = @widgets
        #     super(path, scene)
        # end
        # 



    end


end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spiderfw-0.5.10 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.9 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.7 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.6 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.5 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.4 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.3 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.2 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5.1 lib/spiderfw/controller/page_controller.rb
spiderfw-0.5 lib/spiderfw/controller/page_controller.rb