Class: Osmer::Mapper::Base
- Inherits:
-
Object
- Object
- Osmer::Mapper::Base
show all
- Defined in:
- lib/osmer/mapper/base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(table, name, options = {}) ⇒ Base
Returns a new instance of Base.
7
8
9
10
|
# File 'lib/osmer/mapper/base.rb', line 7
def initialize(table, name, options = {})
@table = table
@name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
5
6
7
|
# File 'lib/osmer/mapper/base.rb', line 5
def name
@name
end
|
#table ⇒ Object
Returns the value of attribute table.
5
6
7
|
# File 'lib/osmer/mapper/base.rb', line 5
def table
@table
end
|
Instance Method Details
#assigns ⇒ Object
16
17
18
|
# File 'lib/osmer/mapper/base.rb', line 16
def assigns
{ name => "src_tags->'#{name}'" }
end
|
#conditions ⇒ Object
20
21
22
|
# File 'lib/osmer/mapper/base.rb', line 20
def conditions
[]
end
|
#fields ⇒ Object
12
13
14
|
# File 'lib/osmer/mapper/base.rb', line 12
def fields
{ name => "TEXT" }
end
|
#indexes ⇒ Object
24
25
26
|
# File 'lib/osmer/mapper/base.rb', line 24
def indexes
{}
end
|