Class: EyeTV::Program
- Inherits:
-
Object
- Object
- EyeTV::Program
- Defined in:
- lib/program.rb
Overview
This class represents an instnace of schedule Program on EyeTV
Constant Summary collapse
- @@repeats_possible =
["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday","never","none","daily","weekdays","weekends"]
Instance Method Summary collapse
- #channel_number ⇒ Object
- #channel_number=(new_channel_number) ⇒ Object
- #delete ⇒ Object
- #description ⇒ Object
- #description=(new_description) ⇒ Object
- #duration ⇒ Object
- #duration=(new_duration) ⇒ Object
- #enabled(value) ⇒ Object
- #enabled? ⇒ Boolean
-
#initialize(program_instance) ⇒ Program
constructor
A new instance of Program.
- #input_source ⇒ Object
- #input_source=(new_input_source) ⇒ Object
- #quality(new_quality) ⇒ Object
- #repeats ⇒ Object
- #repeats=(new_repeats) ⇒ Object
- #start_time ⇒ Object
- #start_time=(new_start_time) ⇒ Object
- #title ⇒ Object
- #title=(new_title) ⇒ Object
- #to_s ⇒ Object
- #uid ⇒ Object
Constructor Details
#initialize(program_instance) ⇒ Program
Returns a new instance of Program.
8 9 10 |
# File 'lib/program.rb', line 8 def initialize(program_instance) @program_ref = program_instance end |
Instance Method Details
#channel_number ⇒ Object
49 50 51 |
# File 'lib/program.rb', line 49 def channel_number @program_ref.channel_number.get end |
#channel_number=(new_channel_number) ⇒ Object
53 54 55 |
# File 'lib/program.rb', line 53 def channel_number=(new_channel_number) @program_ref.channel_number.set(new_channel_number) end |
#delete ⇒ Object
90 91 92 |
# File 'lib/program.rb', line 90 def delete @program_ref.delete end |
#description ⇒ Object
41 42 43 |
# File 'lib/program.rb', line 41 def description @program_ref.description.get end |
#description=(new_description) ⇒ Object
45 46 47 |
# File 'lib/program.rb', line 45 def description=(new_description) @program_ref.description.set(new_description) end |
#duration ⇒ Object
25 26 27 |
# File 'lib/program.rb', line 25 def duration @program_ref.duration.get end |
#duration=(new_duration) ⇒ Object
29 30 31 |
# File 'lib/program.rb', line 29 def duration=(new_duration) @program_ref.duration.set(new_duration) end |
#enabled(value) ⇒ Object
86 87 88 |
# File 'lib/program.rb', line 86 def enabled(value) @program_ref.enabled.set(value) end |
#enabled? ⇒ Boolean
82 83 84 |
# File 'lib/program.rb', line 82 def enabled? @program_ref.enabled.get end |
#input_source ⇒ Object
57 58 59 |
# File 'lib/program.rb', line 57 def input_source @program_ref.input_source.get end |
#input_source=(new_input_source) ⇒ Object
61 62 63 |
# File 'lib/program.rb', line 61 def input_source=(new_input_source) @program_ref.input_source.set(new_input_source) end |
#quality(new_quality) ⇒ Object
74 75 76 |
# File 'lib/program.rb', line 74 def quality @program_ref.quality.get end |
#repeats ⇒ Object
65 66 67 |
# File 'lib/program.rb', line 65 def repeats @program_ref.repeats.get end |
#repeats=(new_repeats) ⇒ Object
69 70 71 72 |
# File 'lib/program.rb', line 69 def repeats=(new_repeats) raise "bad value for repeats" if not @@repeats_possible.include?(new_repeats) @program_ref.repeats.set(new_repeats) end |
#start_time ⇒ Object
16 17 18 |
# File 'lib/program.rb', line 16 def start_time @program_ref.start_time.get end |
#start_time=(new_start_time) ⇒ Object
20 21 22 23 |
# File 'lib/program.rb', line 20 def start_time=(new_start_time) raise "Must be an datetime objet" if(not new_start_time.is_a?(Date) and not new_start_time.is_a?(DateTime)) @program_ref.start_time.set(new_start_time) end |
#title ⇒ Object
33 34 35 |
# File 'lib/program.rb', line 33 def title @program_ref.title.get end |
#title=(new_title) ⇒ Object
37 38 39 |
# File 'lib/program.rb', line 37 def title=(new_title) @program_ref.title.set(new_title) end |
#to_s ⇒ Object
94 95 96 97 |
# File 'lib/program.rb', line 94 def to_s self.title.concat("; start : ").concat(self.start_time.to_s).concat("; duration : "). concat(self.duration.to_s).concat("; on channel : ").concat(self.channel_number.to_s) end |
#uid ⇒ Object
12 13 14 |
# File 'lib/program.rb', line 12 def uid @program_ref.unique_ID.get end |