Class: SyoboiCalendar::Resources::ChannelResource

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/syoboi_calendar/resources/channel_resource.rb

Instance Attribute Summary

Attributes inherited from BaseResource

#source

Instance Method Summary collapse

Methods inherited from BaseResource

#initialize, #updated_at

Constructor Details

This class inherits a constructor from SyoboiCalendar::Resources::BaseResource

Instance Method Details

#channel_group_idInteger?


5
6
7
8
9
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 5

def channel_group_id
  if source["ChGID"]
    source["ChGID"].to_i
  end
end

#commentString?


12
13
14
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 12

def comment
  source["ChComment"]
end

#epg_urlString?


17
18
19
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 17

def epg_url
  source["ChEPGURL"]
end

#idInteger?


22
23
24
25
26
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 22

def id
  if source["ChID"]
    source["ChID"].to_i
  end
end

#iepg_nameString?


29
30
31
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 29

def iepg_name
  source["ChiEPGName"]
end

#nameString?


34
35
36
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 34

def name
  source["ChName"]
end

#numberInteger?


39
40
41
42
43
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 39

def number
  if source["ChNumber"]
    source["ChNumber"].to_i
  end
end

#urlString?


46
47
48
# File 'lib/syoboi_calendar/resources/channel_resource.rb', line 46

def url
  source["ChURL"]
end