Class: Webmachine::Application

Inherits:
Object
  • Object
show all
Defined in:
lib/webmachine/application_monkey_patch.rb

Instance Method Summary collapse

Instance Method Details

#application_contextObject



12
13
14
# File 'lib/webmachine/application_monkey_patch.rb', line 12

def application_context
  @application_context
end

#application_context=(application_context) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/webmachine/application_monkey_patch.rb', line 4

def application_context= application_context
  @application_context = application_context
  # naughty, but better than setting each route manually
  routes.each do | route |
    route.instance_variable_get(:@bindings)[:application_context] = application_context
  end
end