Class: SyoboiCalendar::Resources::ProgramResource
Instance Attribute Summary
Attributes inherited from BaseResource
#source
Instance Method Summary
collapse
#initialize, #updated_at
Instance Method Details
#channel_id ⇒ Integer?
7
8
9
10
11
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 7
def channel_id
if source["ChID"]
source["ChID"].to_i
end
end
|
14
15
16
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 14
def
source["ProgComment"]
end
|
#count ⇒ Integer?
19
20
21
22
23
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 19
def count
if source["Count"]
source["Count"].to_i
end
end
|
#deleted? ⇒ Boolean
Also known as:
deleted
26
27
28
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 26
def deleted?
source["Deleted"] != "0"
end
|
#finished_at ⇒ Time?
32
33
34
35
36
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 32
def finished_at
if source["EdTime"]
::Time.parse(source["EdTime"])
end
end
|
#flag ⇒ Integer?
39
40
41
42
43
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 39
def flag
if source["Flag"]
source["Flag"].to_i
end
end
|
#id ⇒ Integer?
46
47
48
49
50
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 46
def id
if source["PID"]
source["PID"].to_i
end
end
|
#iepg_name ⇒ String?
53
54
55
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 53
def iepg_name
source["ChiEPGName"]
end
|
#rerun? ⇒ Boolean
58
59
60
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 58
def rerun?
!flag.nil? && flag & 0b1000 != 0
end
|
#revision ⇒ Integer?
63
64
65
66
67
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 63
def revision
if source["Revision"]
source["Revision"].to_i
end
end
|
#started_at ⇒ Time?
70
71
72
73
74
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 70
def started_at
if source["StTime"]
::Time.parse(source["StTime"])
end
end
|
#sub_title ⇒ String?
77
78
79
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 77
def sub_title
source["STSubTitle"]
end
|
#title_id ⇒ Integer
82
83
84
85
86
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 82
def title_id
if source["TID"]
source["TID"].to_i
end
end
|
#warn ⇒ Integer?
89
90
91
92
93
|
# File 'lib/syoboi_calendar/resources/program_resource.rb', line 89
def warn
if source["Warn"]
source["Warn"].to_i
end
end
|