Class: OsmImport::Schema
- Inherits:
-
Object
- Object
- OsmImport::Schema
- Defined in:
- lib/osm_import/schema.rb
Defined Under Namespace
Classes: Dsl
Instance Attribute Summary collapse
-
#tables ⇒ Object
readonly
Returns the value of attribute tables.
Class Method Summary collapse
Instance Method Summary collapse
- #dsl ⇒ Object
-
#initialize(&block) ⇒ Schema
constructor
A new instance of Schema.
Constructor Details
#initialize(&block) ⇒ Schema
Returns a new instance of Schema.
11 12 13 14 15 |
# File 'lib/osm_import/schema.rb', line 11 def initialize(&block) @tables = [] dsl.instance_eval(&block) if block end |
Instance Attribute Details
#tables ⇒ Object (readonly)
Returns the value of attribute tables.
5 6 7 |
# File 'lib/osm_import/schema.rb', line 5 def tables @tables end |
Class Method Details
.load(file) ⇒ Object
7 8 9 |
# File 'lib/osm_import/schema.rb', line 7 def self.load(file) new { eval File.read(file) } end |