Class: OsmImport::Table
- Inherits:
-
Object
- Object
- OsmImport::Table
- Defined in:
- lib/osm_import/table.rb
Defined Under Namespace
Classes: Dsl
Instance Attribute Summary collapse
-
#after_create_callbacks ⇒ Object
readonly
Returns the value of attribute after_create_callbacks.
-
#after_import_callbacks ⇒ Object
readonly
Returns the value of attribute after_import_callbacks.
-
#mappers ⇒ Object
readonly
Returns the value of attribute mappers.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#type_mapper ⇒ Object
readonly
Returns the value of attribute type_mapper.
Instance Method Summary collapse
- #dsl ⇒ Object
-
#initialize(type, name, &block) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(type, name, &block) ⇒ Table
Returns a new instance of Table.
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/osm_import/table.rb', line 7 def initialize(type, name, &block) require 'osm_import/mapper' @type = type.to_s.gsub(/s$/,'') @name = name @type_mapper = OsmImport::Mapper.new(:type, :type) @mappers = {} @after_create_callbacks = [] @after_import_callbacks = [] dsl.instance_eval(&block) if block end |
Instance Attribute Details
#after_create_callbacks ⇒ Object (readonly)
Returns the value of attribute after_create_callbacks.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def after_create_callbacks @after_create_callbacks end |
#after_import_callbacks ⇒ Object (readonly)
Returns the value of attribute after_import_callbacks.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def after_import_callbacks @after_import_callbacks end |
#mappers ⇒ Object (readonly)
Returns the value of attribute mappers.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def mappers @mappers end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def type @type end |
#type_mapper ⇒ Object (readonly)
Returns the value of attribute type_mapper.
5 6 7 |
# File 'lib/osm_import/table.rb', line 5 def type_mapper @type_mapper end |