Class: ActiveRoad::OsmPbfImporter::Way
- Inherits:
-
Object
- Object
- ActiveRoad::OsmPbfImporter::Way
- Defined in:
- app/models/active_road/osm_pbf_importer.rb
Instance Attribute Summary collapse
-
#addr_housenumber ⇒ Object
Returns the value of attribute addr_housenumber.
-
#admin_level ⇒ Object
Returns the value of attribute admin_level.
-
#bike ⇒ Object
Returns the value of attribute bike.
-
#boundary ⇒ Object
Returns the value of attribute boundary.
-
#car ⇒ Object
Returns the value of attribute car.
-
#id ⇒ Object
Returns the value of attribute id.
-
#maxspeed ⇒ Object
Returns the value of attribute maxspeed.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nodes ⇒ Object
Returns the value of attribute nodes.
-
#oneway ⇒ Object
Returns the value of attribute oneway.
-
#options ⇒ Object
Returns the value of attribute options.
-
#pedestrian ⇒ Object
Returns the value of attribute pedestrian.
-
#train ⇒ Object
Returns the value of attribute train.
Instance Method Summary collapse
- #add_node(id) ⇒ Object
-
#initialize(id, nodes = [], car = false, bike = false, train = false, pedestrian = false, name = "", maxspeed = 0, oneway = false, boundary = "", admin_level = "", addr_housenumber = "", options = {}) ⇒ Way
constructor
A new instance of Way.
- #marshal_dump ⇒ Object
- #marshal_load(array) ⇒ Object
Constructor Details
#initialize(id, nodes = [], car = false, bike = false, train = false, pedestrian = false, name = "", maxspeed = 0, oneway = false, boundary = "", admin_level = "", addr_housenumber = "", options = {}) ⇒ Way
Returns a new instance of Way.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 263 def initialize(id, nodes = [], car = false, bike = false, train = false, pedestrian = false, name = "", maxspeed = 0, oneway = false, boundary = "", admin_level = "", addr_housenumber = "", = {}) @id = id @nodes = nodes @car = car @bike = bike @train = train @pedestrian = pedestrian @name = name @maxspeed = maxspeed @oneway = oneway @boundary = boundary @admin_level = admin_level @addr_housenumber = addr_housenumber @options = end |
Instance Attribute Details
#addr_housenumber ⇒ Object
Returns the value of attribute addr_housenumber.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def addr_housenumber @addr_housenumber end |
#admin_level ⇒ Object
Returns the value of attribute admin_level.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def admin_level @admin_level end |
#bike ⇒ Object
Returns the value of attribute bike.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def bike @bike end |
#boundary ⇒ Object
Returns the value of attribute boundary.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def boundary @boundary end |
#car ⇒ Object
Returns the value of attribute car.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def car @car end |
#id ⇒ Object
Returns the value of attribute id.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def id @id end |
#maxspeed ⇒ Object
Returns the value of attribute maxspeed.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def maxspeed @maxspeed end |
#name ⇒ Object
Returns the value of attribute name.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def name @name end |
#nodes ⇒ Object
Returns the value of attribute nodes.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def nodes @nodes end |
#oneway ⇒ Object
Returns the value of attribute oneway.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def oneway @oneway end |
#options ⇒ Object
Returns the value of attribute options.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def @options end |
#pedestrian ⇒ Object
Returns the value of attribute pedestrian.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def pedestrian @pedestrian end |
#train ⇒ Object
Returns the value of attribute train.
261 262 263 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 261 def train @train end |
Instance Method Details
#add_node(id) ⇒ Object
279 280 281 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 279 def add_node(id) @nodes << id end |
#marshal_dump ⇒ Object
283 284 285 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 283 def marshal_dump [@id, @nodes, @car, @bike, @train, @pedestrian, @name, @maxspeed, @oneway, @boundary, @admin_level, @addr_housenumber, @options] end |
#marshal_load(array) ⇒ Object
287 288 289 |
# File 'app/models/active_road/osm_pbf_importer.rb', line 287 def marshal_load array @id, @nodes, @car, @bike, @train, @pedestrian, @name, @maxspeed, @oneway, @boundary, @admin_level, @addr_housenumber, @options = array end |