Class: RoadForest::ContentHandling::Wrap::Wrapper
- Inherits:
-
Object
- Object
- RoadForest::ContentHandling::Wrap::Wrapper
- Defined in:
- lib/roadforest/content-handling/handler-wrap.rb
Instance Attribute Summary collapse
-
#handler ⇒ Object
readonly
Returns the value of attribute handler.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, handler) ⇒ Wrapper
constructor
A new instance of Wrapper.
- #local_to_network(base_uri, network) ⇒ Object (also: #from_graph)
- #network_to_local(base_uri, source) ⇒ Object (also: #to_graph)
Constructor Details
#initialize(type, handler) ⇒ Wrapper
Returns a new instance of Wrapper.
5 6 7 8 |
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 5 def initialize(type, handler) @type = type @handler = handler end |
Instance Attribute Details
#handler ⇒ Object (readonly)
Returns the value of attribute handler.
9 10 11 |
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 9 def handler @handler end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
9 10 11 |
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 9 def type @type end |
Instance Method Details
#local_to_network(base_uri, network) ⇒ Object Also known as: from_graph
11 12 13 |
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 11 def local_to_network(base_uri, network) @handler.local_to_network(base_uri, network) end |
#network_to_local(base_uri, source) ⇒ Object Also known as: to_graph
16 17 18 |
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 16 def network_to_local(base_uri, source) @handler.network_to_local(base_uri, source) end |