Class: RoadForest::Application::ServicesHost

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeServicesHost

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

Parameters:

  • value

    the value to set the attribute application to.



9
10
11
# File 'lib/roadforest/application/services-host.rb', line 9

def application=(value)
  @application = value
end

#authorizationObject Also known as: authz



21
22
23
24
25
26
27
# File 'lib/roadforest/application/services-host.rb', line 21

def authorization
  @authorization ||=
    begin
      require 'roadforest/authorization'
      Authorization::Manager.new
    end
end

#canonical_hostObject



13
14
15
# File 'lib/roadforest/application/services-host.rb', line 13

def canonical_host
  @application.canonical_host
end

#loggerObject



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

#routerObject



17
18
19
# File 'lib/roadforest/application/services-host.rb', line 17

def router
  @router ||= PathProvider.new(@application.dispatcher)
end

#type_handlingObject



29
30
31
# File 'lib/roadforest/application/services-host.rb', line 29

def type_handling
  @type_handling ||= ContentHandling::Engine.default
end