lib/syoboi_calendar/resources/program.rb in syoboi_calendar-0.3.1 vs lib/syoboi_calendar/resources/program.rb in syoboi_calendar-0.4.0

- old
+ new

@@ -1,55 +1,76 @@ module SyoboiCalendar module Resources class Program < Base - attr_accessor :channel, :title + # @return [SyoboiCalendar::Resources::Channel, nil] + attr_accessor :channel - def id - response.PID.try(:to_i) - end + # @return [SyoboiCalendar::Resources::Title, nil] + attr_accessor :title - def title_id - response.TID.try(:to_i) + # @return [Integer, nil] + def channel_id + response.ChID.try(:to_i) end - def started_at - Time.parse(response.StTime) + # @return [String, nil] + def comment + response.ProgComment end - def finished_at - Time.parse(response.EdTime) - end - + # @return [Integer, nil] def count response.Count.try(:to_i) end - def sub_title - response.STSubTitle + # @return [Boolean] + def deleted? + response.Deleted != "0" end - def comment - response.ProgComment - end - + # @return [Integer, nil] def flag response.Flag.try(:to_i) end - def deleted? - response.Deleted != "0" + # @return [Integer, nil] + def id + response.PID.try(:to_i) end - def warn - response.Warn.try(:to_i) + # @return [String, nil] + def iepg_name + response.ChiEPGName end - def channel_id - response.ChID.try(:to_i) + # @return [Time] + def finished_at + ::Time.parse(response.EdTime) end + # @return [Integer, nil] def revision response.Revision.try(:to_i) + end + + # @return [Time] + def started_at + ::Time.parse(response.StTime) + end + + # @return [String, nil] + def sub_title + response.STSubTitle + end + + # @return [Integer] + def title_id + response.TID.try(:to_i) + end + + # @return [Integer, nil] + def warn + response.Warn.try(:to_i) end end end end