Class: RoadForest::ContentHandling::Wrap::Wrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/roadforest/content-handling/handler-wrap.rb

Direct Known Subclasses

Parse, Render

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#handlerObject (readonly)

Returns the value of attribute handler.



9
10
11
# File 'lib/roadforest/content-handling/handler-wrap.rb', line 9

def handler
  @handler
end

#typeObject (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