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?

Returns:

  • (Integer, nil)


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?

Returns:

  • (String, nil)


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

def comment
  source["ChComment"]
end

#epg_urlString?

Returns:

  • (String, nil)


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

def epg_url
  source["ChEPGURL"]
end

#idInteger?

Returns:

  • (Integer, nil)


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?

Returns:

  • (String, nil)


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

def iepg_name
  source["ChiEPGName"]
end

#nameString?

Returns:

  • (String, nil)


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

def name
  source["ChName"]
end

#numberInteger?

Returns:

  • (Integer, nil)


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?

Returns:

  • (String, nil)


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

def url
  source["ChURL"]
end