Class: Hanamimastery::CLI::Entities::Episode
- Inherits:
-
Object
- Object
- Hanamimastery::CLI::Entities::Episode
- Defined in:
- lib/hanamimastery/cli/repositories/episodes.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content) ⇒ Episode
constructor
A new instance of Episode.
Constructor Details
#initialize(content) ⇒ Episode
Returns a new instance of Episode.
7 8 9 10 |
# File 'lib/hanamimastery/cli/repositories/episodes.rb', line 7 def initialize(content) starts_from = content.lines[1..-1].index("---\n") + 2 @content = content.lines[starts_from..-1].join end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
11 12 13 |
# File 'lib/hanamimastery/cli/repositories/episodes.rb', line 11 def content @content end |