Class: SDL::Base::Service
- Inherits:
-
Object
- Object
- SDL::Base::Service
- Includes:
- URIMappedResource
- Defined in:
- lib/sdl/base/service.rb,
lib/sdl/exporters/rdf_exporter.rb,
lib/sdl/exporters/xml_service_exporter.rb
Instance Attribute Summary collapse
-
#compendium ⇒ Object
Returns the value of attribute compendium.
-
#facts ⇒ Object
Returns the value of attribute facts.
-
#symbolic_name ⇒ Object
Returns the value of attribute symbolic_name.
Instance Method Summary collapse
- #fact_class_facts_map ⇒ Object
-
#initialize(symbolic_name) ⇒ Service
constructor
A new instance of Service.
- #to_rdf ⇒ Object
- #to_xml ⇒ Object
Methods included from URIMappedResource
Constructor Details
#initialize(symbolic_name) ⇒ Service
Returns a new instance of Service.
6 7 8 9 10 |
# File 'lib/sdl/base/service.rb', line 6 def initialize(symbolic_name) @symbolic_name = symbolic_name @facts, @facades = [], [] end |
Instance Attribute Details
#compendium ⇒ Object
Returns the value of attribute compendium.
4 5 6 |
# File 'lib/sdl/base/service.rb', line 4 def compendium @compendium end |
#facts ⇒ Object
Returns the value of attribute facts.
4 5 6 |
# File 'lib/sdl/base/service.rb', line 4 def facts @facts end |
#symbolic_name ⇒ Object
Returns the value of attribute symbolic_name.
4 5 6 |
# File 'lib/sdl/base/service.rb', line 4 def symbolic_name @symbolic_name end |
Instance Method Details
#fact_class_facts_map ⇒ Object
12 13 14 |
# File 'lib/sdl/base/service.rb', line 12 def fact_class_facts_map facts.group_by &:class end |
#to_rdf ⇒ Object
33 34 35 |
# File 'lib/sdl/exporters/rdf_exporter.rb', line 33 def to_rdf SDL::Exporters::RDFExporter.new(@compendium).export_service(self) end |
#to_xml ⇒ Object
40 41 42 |
# File 'lib/sdl/exporters/xml_service_exporter.rb', line 40 def to_xml SDL::Exporters::XMLServiceExporter.new(@compendium).export_service(self) end |