Class: Junkie::Episode
- Inherits:
-
Object
- Object
- Junkie::Episode
- Defined in:
- lib/junkie/episode.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#found_at ⇒ Object
readonly
Returns the value of attribute found_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#series ⇒ Object
readonly
Returns the value of attribute series.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(series, link, description = nil) ⇒ Episode
constructor
A new instance of Episode.
- #to_s ⇒ Object
Constructor Details
#initialize(series, link, description = nil) ⇒ Episode
Returns a new instance of Episode.
10 11 12 13 14 15 16 17 |
# File 'lib/junkie/episode.rb', line 10 def initialize(series, link, description=nil) @series = series @link = link @found_at = DateTime.now @description = description @status = :found @id = episode_identifier end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/junkie/episode.rb', line 8 def description @description end |
#found_at ⇒ Object (readonly)
Returns the value of attribute found_at.
7 8 9 |
# File 'lib/junkie/episode.rb', line 7 def found_at @found_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/junkie/episode.rb', line 7 def id @id end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
7 8 9 |
# File 'lib/junkie/episode.rb', line 7 def link @link end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
7 8 9 |
# File 'lib/junkie/episode.rb', line 7 def series @series end |
#status ⇒ Object
Returns the value of attribute status.
8 9 10 |
# File 'lib/junkie/episode.rb', line 8 def status @status end |
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/junkie/episode.rb', line 19 def to_s "%s (%s)" % [ @series, episode_identifier ] end |