Class: RoadForest::Application::ServicesHost
- Inherits:
-
Object
- Object
- RoadForest::Application::ServicesHost
- Includes:
- Graph::Normalization
- 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?
Constant Summary
Constants included from Graph::Normalization
Instance Attribute Summary collapse
-
#application ⇒ Object
writeonly
Sets the attribute application.
- #authorization ⇒ Object (also: #authz)
- #canonical_host ⇒ Object
-
#default_content_engine ⇒ Object
Returns the value of attribute default_content_engine.
- #logger ⇒ Object
-
#root_url ⇒ Object
Returns the value of attribute root_url.
-
#router ⇒ Object
writeonly
Sets the attribute router.
-
#type_handling ⇒ Object
writeonly
Sets the attribute type_handling.
Instance Method Summary collapse
- #augmenter ⇒ Object
- #dispatcher ⇒ Object (also: #router)
-
#initialize ⇒ ServicesHost
constructor
A new instance of ServicesHost.
- #path_provider ⇒ Object
Methods included from Graph::Normalization
#expand_curie, #expand_curie_pair, #interned_uri, #literal, #normalize_context, #normalize_property, #normalize_resource, #normalize_statement, #normalize_term, #normalize_tuple, #normalize_uri, #relevant_prefixes_for_graph, #uri, #vocabularies_in_graph
Constructor Details
#initialize ⇒ ServicesHost
Returns a new instance of ServicesHost.
8 9 |
# File 'lib/roadforest/application/services-host.rb', line 8 def initialize end |
Instance Attribute Details
#application=(value) ⇒ Object (writeonly)
Sets the attribute application
11 12 13 |
# File 'lib/roadforest/application/services-host.rb', line 11 def application=(value) @application = value end |
#authorization ⇒ Object Also known as: authz
35 36 37 38 39 40 41 |
# File 'lib/roadforest/application/services-host.rb', line 35 def @authorization ||= begin require 'roadforest/authorization' Authorization::Manager.new end end |
#canonical_host ⇒ Object
18 19 20 |
# File 'lib/roadforest/application/services-host.rb', line 18 def canonical_host @canonical_host ||= RDF::URI.intern(@root_url) end |
#default_content_engine ⇒ Object
Returns the value of attribute default_content_engine.
16 17 18 |
# File 'lib/roadforest/application/services-host.rb', line 16 def default_content_engine @default_content_engine end |
#logger ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/roadforest/application/services-host.rb', line 43 def logger @logger ||= begin require 'logger' Logger.new("roadforest.log") end end |
#root_url ⇒ Object
Returns the value of attribute root_url.
14 15 16 |
# File 'lib/roadforest/application/services-host.rb', line 14 def root_url @root_url end |
#router=(value) ⇒ Object (writeonly)
Sets the attribute router
12 13 14 |
# File 'lib/roadforest/application/services-host.rb', line 12 def router=(value) @router = value end |
#type_handling=(value) ⇒ Object (writeonly)
Sets the attribute type_handling
12 13 14 |
# File 'lib/roadforest/application/services-host.rb', line 12 def type_handling=(value) @type_handling = value end |
Instance Method Details
#augmenter ⇒ Object
22 23 24 |
# File 'lib/roadforest/application/services-host.rb', line 22 def augmenter @augmenter ||= Augment::Augmenter.new(self) end |
#dispatcher ⇒ Object Also known as: router
26 27 28 |
# File 'lib/roadforest/application/services-host.rb', line 26 def dispatcher @dispatcher ||= Dispatcher.new(self) end |
#path_provider ⇒ Object
31 32 33 |
# File 'lib/roadforest/application/services-host.rb', line 31 def path_provider @path_provider ||= router.path_provider end |