Class: ThetvdbMapper::Mapping::Base
- Inherits:
-
Object
- Object
- ThetvdbMapper::Mapping::Base
show all
- Defined in:
- lib/thetvdb_mapper/mapping/base.rb
Class Method Summary
collapse
Class Method Details
.convert_to_list(data) ⇒ Object
14
15
16
|
# File 'lib/thetvdb_mapper/mapping/base.rb', line 14
def self.convert_to_list(data)
ThetvdbMapper::Mapping::StringList.map(data)
end
|
.map(data) ⇒ Object
2
3
4
5
6
7
8
9
10
11
12
|
# File 'lib/thetvdb_mapper/mapping/base.rb', line 2
def self.map(data)
rules.each do |before, after|
data[after] = data.delete(before)
end
if respond_to?(:convert)
data = convert(data)
end
data
end
|