Class: EhbrsRubyUtils::Videos::Series::Rename::SeasonGroup
- Inherits:
-
LineResult
- Object
- LineResult
- EhbrsRubyUtils::Videos::Series::Rename::SeasonGroup
- Defined in:
- lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb
Instance Attribute Summary collapse
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#season ⇒ Object
readonly
Returns the value of attribute season.
Instance Method Summary collapse
-
#initialize(season, files) ⇒ SeasonGroup
constructor
A new instance of SeasonGroup.
- #line_out ⇒ Object
- #show(level) ⇒ Object
Constructor Details
#initialize(season, files) ⇒ SeasonGroup
Returns a new instance of SeasonGroup.
12 13 14 15 16 |
# File 'lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb', line 12 def initialize(season, files) super() @season = season @files = files.sort_by { |f| [f.episode] } end |
Instance Attribute Details
#files ⇒ Object (readonly)
Returns the value of attribute files.
10 11 12 |
# File 'lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb', line 10 def files @files end |
#season ⇒ Object (readonly)
Returns the value of attribute season.
10 11 12 |
# File 'lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb', line 10 def season @season end |
Instance Method Details
#line_out ⇒ Object
18 19 20 |
# File 'lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb', line 18 def line_out 'Season: '.cyan + "#{season} (#{first_episode} - #{last_episode})" end |
#show(level) ⇒ Object
22 23 24 25 |
# File 'lib/ehbrs_ruby_utils/videos/series/rename/season_group.rb', line 22 def show(level) super files.each { |file| file.show(level + 1) } end |