Class: ThetvdbMapper::Mapping::Episode
- Defined in:
- lib/thetvdb_mapper/mapping/episode.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#convert_to_list, #initialize, #list_mapping_object, #map
Constructor Details
This class inherits a constructor from ThetvdbMapper::Mapping::Base
Instance Method Details
#convert ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/thetvdb_mapper/mapping/episode.rb', line 37 def convert data.merge({ director: convert_to_list(data[:director]), guest_stars: convert_to_list(data[:guest_stars]), writer: convert_to_list(data[:writer]), last_updated_at: Time.at(data[:last_updated_at].to_i) }) end |
#rules ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/thetvdb_mapper/mapping/episode.rb', line 2 def rules { 'id' => :id, 'Combined_episodenumber' => :combined_episode_number, 'Combined_season' => :combined_season, 'DVD_episodenumber' => :dvd_episode_number, 'DVD_season' => :dvd_season, 'Director' => :director, 'EpImgFlag' => :ep_img_flag, 'EpisodeName' => :name, 'EpisodeNumber' => :number, 'FirstAired' => :first_aired, 'GuestStars' => :guest_stars, 'IMDB_ID' => :imdb_id, 'Language' => :language, 'Overview' => :overview, 'ProductionCode' => :production_code, 'Rating' => :rating, 'RatingCount' => :rating_count, 'SeasonNumber' => :season, 'Writer' => :writer, 'absolute_number' => :absolute_number, 'airsafter_season' => :airs_after_season, 'airsbefore_episode' => :airs_before_episode, 'airsbefore_season' => :airs_before_season, 'filename' => :filename_path, 'lastupdated' => :last_updated_at, 'seasonid' => :season_id, 'seriesid' => :series_id, 'thumb_added' => :thumbnail_added_at, 'thumb_height' => :thumbnail_height, 'thumb_width' => :thumbnail_width } end |