Class: ThetvdbApi::Response::Update
Instance Method Summary
collapse
#[], #[]=, #body, #each, #env, #headers, #initialize, #inspect, #multi_xml_parse, #status
Instance Method Details
#banner_normalize ⇒ Object
24
25
26
|
# File 'lib/thetvdb_api/response/update.rb', line 24
def banner_normalize
normalize('Banner')
end
|
#episode_normalize ⇒ Object
20
21
22
|
# File 'lib/thetvdb_api/response/update.rb', line 20
def episode_normalize
normalize('Episode')
end
|
#normalize(key) ⇒ Object
28
29
30
|
# File 'lib/thetvdb_api/response/update.rb', line 28
def normalize(key)
@parse[key] = [@parse[key]] if @parse[key].is_a?(Hash)
end
|
#parse ⇒ Object
2
3
4
5
6
7
8
9
10
|
# File 'lib/thetvdb_api/response/update.rb', line 2
def parse
unless @parse
@parse = xml_parse
series_normalize
episode_normalize
banner_normalize
end
@parse
end
|
#series_normalize ⇒ Object
16
17
18
|
# File 'lib/thetvdb_api/response/update.rb', line 16
def series_normalize
normalize('Series')
end
|
#xml_parse ⇒ Object
12
13
14
|
# File 'lib/thetvdb_api/response/update.rb', line 12
def xml_parse
multi_xml_parse.fetch('Data', {})
end
|