hassox (owner)

Revisions

gist: 229792 Download_button fork
public
Public Clone URL: git://gist.github.com/229792.git
Embed All Files: show embed
my_stack_inheritance_example.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
##### Stack Inheritance example
 
class OurBaseStack < Pancake::Stacks::Short
  router do |r|
    r.mount(UserStack, "/users")
    r.mount(AdminStack, "/admin")
    r.mount(AssetStack, "/assets")
    r.add("/heartbeat"){ |env| Rack::Response.new("alive!").finish }
  end
  
  stack(:uploader).use(Rack::Upload)
  
  get "(/)" do
    render :welcome
  end
end
 
class ClientApplication < OurBaseStack
  get "/specific/functionality" do
    # stuff
  end
end