Class: ThetvdbApi::Response::FullSeries
Instance Method Summary
collapse
#[], #[]=, #body, #each, #env, #headers, #initialize, #inspect, #multi_xml_parse, #status
Instance Method Details
#episode_normalize ⇒ Object
14
15
16
|
# File 'lib/thetvdb_api/response/full_series.rb', line 14
def episode_normalize
normalize('Episode')
end
|
#normalize(key) ⇒ Object
18
19
20
|
# File 'lib/thetvdb_api/response/full_series.rb', line 18
def normalize(key)
@parse[key] = [@parse[key]] if @parse[key].is_a?(Hash)
end
|
#parse ⇒ Object
2
3
4
5
6
7
8
|
# File 'lib/thetvdb_api/response/full_series.rb', line 2
def parse
unless @parse
@parse = xml_parse
episode_normalize
end
@parse
end
|
#xml_parse ⇒ Object
10
11
12
|
# File 'lib/thetvdb_api/response/full_series.rb', line 10
def xml_parse
multi_xml_parse.fetch('Data', {})
end
|