Class: P3::Eztv::Episode
- Inherits:
-
Object
- Object
- P3::Eztv::Episode
- Defined in:
- lib/p3-eztv.rb
Instance Attribute Summary collapse
-
#episode_number ⇒ Object
Returns the value of attribute episode_number.
-
#links ⇒ Object
Returns the value of attribute links.
-
#magnet_link ⇒ Object
Returns the value of attribute magnet_link.
-
#raw_title ⇒ Object
Returns the value of attribute raw_title.
-
#season ⇒ Object
Returns the value of attribute season.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(episode_node) ⇒ Episode
constructor
A new instance of Episode.
- #s01e01_format ⇒ Object
Constructor Details
#initialize(episode_node) ⇒ Episode
Returns a new instance of Episode.
104 105 106 107 |
# File 'lib/p3-eztv.rb', line 104 def initialize(episode_node) set_season_and_episode_number(episode_node) set_links(episode_node) end |
Instance Attribute Details
#episode_number ⇒ Object
Returns the value of attribute episode_number.
102 103 104 |
# File 'lib/p3-eztv.rb', line 102 def episode_number @episode_number end |
#links ⇒ Object
Returns the value of attribute links.
102 103 104 |
# File 'lib/p3-eztv.rb', line 102 def links @links end |
#magnet_link ⇒ Object
Returns the value of attribute magnet_link.
102 103 104 |
# File 'lib/p3-eztv.rb', line 102 def magnet_link @magnet_link end |
#raw_title ⇒ Object
Returns the value of attribute raw_title.
102 103 104 |
# File 'lib/p3-eztv.rb', line 102 def raw_title @raw_title end |
#season ⇒ Object
Returns the value of attribute season.
102 103 104 |
# File 'lib/p3-eztv.rb', line 102 def season @season end |
Instance Method Details
#eql?(other) ⇒ Boolean
113 114 115 |
# File 'lib/p3-eztv.rb', line 113 def eql?(other) other.hash == self.hash end |
#hash ⇒ Object
117 118 119 |
# File 'lib/p3-eztv.rb', line 117 def hash [episode_number, season].hash end |
#s01e01_format ⇒ Object
109 110 111 |
# File 'lib/p3-eztv.rb', line 109 def s01e01_format @s01e01_format ||= "S#{season.to_s.rjust(2,'0')}E#{episode_number.to_s.rjust(2,'0')}" end |