Class: SWR3::NowPlaying::CoverMapper
- Inherits:
-
Object
- Object
- SWR3::NowPlaying::CoverMapper
- Defined in:
- lib/swr3_now_playing/mapper.rb
Class Method Summary collapse
Class Method Details
.map(json) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/swr3_now_playing/mapper.rb', line 20 def map(json) Cover.new.tap do |cover| %w(small thumbnail detail zoom).each do |size| cover[size] = json[size]['src'] end end end |