class Ripdiru::Program

Attributes

duration[RW]
from[RW]
id[RW]
info[RW]
station[RW]
title[RW]
to[RW]

Public Class Methods

new(args = {}) click to toggle source
# File lib/ripdiru.rb, line 129
def initialize(args = {})
  args.each do |k, v|
    send "#{k}=", v
  end
end

Public Instance Methods

effective_date() click to toggle source
# File lib/ripdiru.rb, line 135
def effective_date
  time = from.hour < 5 ? from - 24 * 60 * 60 : from
  Date.new(time.year, time.month, time.day)
end
recording_duration() click to toggle source
# File lib/ripdiru.rb, line 140
def recording_duration
  (to - Time.now).to_i
end