Sha256: fdfad51ffdd85a3c7c08f32bdadb5b6844ce1ba550744dd74d68cb9022e0e20d
Contents?: true
Size: 1013 Bytes
Versions: 2
Compression:
Stored size: 1013 Bytes
Contents
module SimplePvr module Model class Schedule include DataMapper::Resource storage_names[:default] = 'schedules' property :id, Serial property :type, Enum[:specification, :exception] property :title, String, :length => 255 # If specified (and channel is specified too), this schedule is for a specific # programme at a specific channel at a specific time property :start_time, DateTime property :filter_by_weekday, Boolean property :monday, Boolean property :tuesday, Boolean property :wednesday, Boolean property :thursday, Boolean property :friday, Boolean property :saturday, Boolean property :sunday, Boolean belongs_to :channel, required: false def self.add_specification(options) Schedule.create( type: :specification, title: options[:title], channel: options[:channel], start_time: options[:start_time]) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple_pvr-0.0.2 | lib/simple_pvr/model/schedule.rb |
simple_pvr-0.0.1 | lib/simple_pvr/model/schedule.rb |