Class: RoadForest::Application::ServicesHost
- Inherits:
-
Object
- Object
- RoadForest::Application::ServicesHost
- Defined in:
- lib/roadforest/application/services-host.rb
Overview
XXX Worth doing some meta to get reality checking of configs here? Better fail early if there’s no DB configured, right?
Instance Attribute Summary collapse
-
#application ⇒ Object
writeonly
Sets the attribute application.
- #authorization ⇒ Object (also: #authz)
- #canonical_host ⇒ Object
- #logger ⇒ Object
- #router ⇒ Object
- #type_handling ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ ServicesHost
constructor
A new instance of ServicesHost.
Constructor Details
#initialize ⇒ ServicesHost
Returns a new instance of ServicesHost.
6 7 |
# File 'lib/roadforest/application/services-host.rb', line 6 def initialize end |
Instance Attribute Details
#application=(value) ⇒ Object (writeonly)
Sets the attribute application
9 10 11 |
# File 'lib/roadforest/application/services-host.rb', line 9 def application=(value) @application = value end |
#authorization ⇒ Object Also known as: authz
21 22 23 24 25 26 27 |
# File 'lib/roadforest/application/services-host.rb', line 21 def @authorization ||= begin require 'roadforest/authorization' Authorization::Manager.new end end |
#canonical_host ⇒ Object
13 14 15 |
# File 'lib/roadforest/application/services-host.rb', line 13 def canonical_host @application.canonical_host end |
#logger ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/roadforest/application/services-host.rb', line 33 def logger @logger ||= begin require 'logger' Logger.new("roadforest.log") end end |
#router ⇒ Object
17 18 19 |
# File 'lib/roadforest/application/services-host.rb', line 17 def router @router ||= PathProvider.new(@application.dispatcher) end |
#type_handling ⇒ Object
29 30 31 |
# File 'lib/roadforest/application/services-host.rb', line 29 def type_handling @type_handling ||= ContentHandling::Engine.default end |