Class: AudioBookCreator::SpokenChapter

Inherits:
Object
  • Object
show all
Defined in:
lib/audio_book_creator/spoken_chapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, filename) ⇒ SpokenChapter

Returns a new instance of SpokenChapter.



5
6
7
8
# File 'lib/audio_book_creator/spoken_chapter.rb', line 5

def initialize(title, filename)
  @title = title
  @filename = filename
end

Instance Attribute Details

#filenameObject

Returns the value of attribute filename.



3
4
5
# File 'lib/audio_book_creator/spoken_chapter.rb', line 3

def filename
  @filename
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/audio_book_creator/spoken_chapter.rb', line 3

def title
  @title
end

Instance Method Details

#==(other) ⇒ Object Also known as: eql?



10
11
12
13
# File 'lib/audio_book_creator/spoken_chapter.rb', line 10

def ==(other)
  other.kind_of?(SpokenChapter) &&
    other.title.eql?(title) && other.filename.eql?(filename)
end