Class: Epguides::Episode
- Inherits:
-
Object
- Object
- Epguides::Episode
- Defined in:
- lib/epguides/episode.rb
Constant Summary collapse
- REGX =
/(\d+)\s+(\d+)-(\d+)\s+(.*)\s+(\d*\/*\w{3}\/\d{2})\s+(.+\Z)/
Instance Attribute Summary collapse
-
#air_date ⇒ Object
readonly
Returns the value of attribute air_date.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#season ⇒ Object
readonly
Returns the value of attribute season.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(season, number, prod_number, air_date, title) ⇒ Episode
constructor
A new instance of Episode.
Constructor Details
#initialize(season, number, prod_number, air_date, title) ⇒ Episode
Returns a new instance of Episode.
7 8 9 10 11 12 13 |
# File 'lib/epguides/episode.rb', line 7 def initialize(season, number, prod_number, air_date, title) @season = season @number = number @prod_number = prod_number.strip @air_date = parse_date(air_date) @title = title.strip end |
Instance Attribute Details
#air_date ⇒ Object (readonly)
Returns the value of attribute air_date.
5 6 7 |
# File 'lib/epguides/episode.rb', line 5 def air_date @air_date end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
5 6 7 |
# File 'lib/epguides/episode.rb', line 5 def number @number end |
#season ⇒ Object (readonly)
Returns the value of attribute season.
5 6 7 |
# File 'lib/epguides/episode.rb', line 5 def season @season end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/epguides/episode.rb', line 5 def title @title end |