Module: FilmOn::ChannelHelper

Included in:
Base
Defined in:
lib/film_on/helpers/channel_helper.rb

Instance Method Summary collapse

Instance Method Details

#convert_channel(json) ⇒ Object



5
6
7
8
# File 'lib/film_on/helpers/channel_helper.rb', line 5

def convert_channel(json)
  hash = JSON.parse(json)
  FilmOn::Channel.new(hash)
end

#convert_channels(json) ⇒ Object



10
11
12
13
# File 'lib/film_on/helpers/channel_helper.rb', line 10

def convert_channels(json)
  hash = JSON.parse(json)
  hash.map{|ch| FilmOn::Channel.new(ch)}
end