Class: Neo4j::Spatial::OSMWays
- Inherits:
-
Object
- Object
- Neo4j::Spatial::OSMWays
- Defined in:
- lib/neo4j/spatial/osm.rb
Instance Attribute Summary collapse
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
Instance Method Summary collapse
- #[](index) ⇒ Object
- #each ⇒ Object
- #first ⇒ Object
-
#initialize(nodes) ⇒ OSMWays
constructor
A new instance of OSMWays.
Constructor Details
#initialize(nodes) ⇒ OSMWays
Returns a new instance of OSMWays.
53 54 55 |
# File 'lib/neo4j/spatial/osm.rb', line 53 def initialize(nodes) @nodes = nodes end |
Instance Attribute Details
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes.
52 53 54 |
# File 'lib/neo4j/spatial/osm.rb', line 52 def nodes @nodes end |
Instance Method Details
#[](index) ⇒ Object
62 63 64 65 66 |
# File 'lib/neo4j/spatial/osm.rb', line 62 def [](index) index.is_a?(Range) ? @nodes.to_a[index].map{|n| OSMWay.new(n)} : OSMWay.new(@nodes.to_a[index]) end |