Class: Channel

Inherits:
Object show all
Defined in:
lib/data_services/channel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Channel

Returns a new instance of Channel.



10
11
12
13
14
15
16
17
# File 'lib/data_services/channel.rb', line 10

def initialize(logger)
  @logger = logger
  @call_sign = "";
  @cdvr_recordable = false;
  @number = "";
  @tms_id = "";
  @parentally_blocked = false;
end

Instance Attribute Details

Instance Method Details

#populate(channel_hashmap) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/data_services/channel.rb', line 19

def populate channel_hashmap
  @channel_numbers = channel_hashmap["channels"]
  ncs_service_id = channel_hashmap ["ncsServiceId"]
  @tms_id = channel_hashmap["tmsId"]
  @entitlement_id = channel_hashmap["entitlementId"]
  @network_name = channel_hashmap["networkName"]
  network_id = channel_hashmap["networkId"]
  @call_sign = channel_hashmap["callSign"]
  stream_uri = channel_hashmap["streamUri"]
  logo_url = channel_hashmap["logoUrl"]
  @genres = channel_hashmap["genres"]
  @available_out_of_home = channel_hashmap["availableOutOfHome"]
  @favorite = channel_hashmap["favorite"]
  @cdvr_recordable = channel_hashmap["cdvrRecordable"]
  @block_eas = channel_hashmap["blockEas"]
  @hd = channel_hashmap["hd"]
  streams = channel_hashmap["streams"]
  @parentally_blocked = channel_hashmap["parentallyBlocked"]
end