Class: MangaedenApi::Chapter
- Inherits:
-
Object
- Object
- MangaedenApi::Chapter
- Defined in:
- lib/mangaeden_api/chapter.rb
Overview
Class containing all chapter informations.
Instance Attribute Summary collapse
-
#chapter_id ⇒ Object
images is a Hash where the keys are the image number and the values are the image path.
-
#chapter_number ⇒ Object
images is a Hash where the keys are the image number and the values are the image path.
-
#chapter_title ⇒ Object
images is a Hash where the keys are the image number and the values are the image path.
-
#images ⇒ Object
images is a Hash where the keys are the image number and the values are the image path.
Instance Method Summary collapse
-
#initialize(images, chapter_info) ⇒ Chapter
constructor
A new instance of Chapter.
Constructor Details
#initialize(images, chapter_info) ⇒ Chapter
Returns a new instance of Chapter.
8 9 10 11 12 13 14 15 16 |
# File 'lib/mangaeden_api/chapter.rb', line 8 def initialize(images, chapter_info) @chapter_id = chapter_info[3] @chapter_title = chapter_info[2] @chapter_number = chapter_info[0] @images = [] images.each do |i| @images << { i[0] => "#{MangaedenApi::IMAGE_HOST}#{i[1]}" } end end |
Instance Attribute Details
#chapter_id ⇒ Object
images is a Hash where the keys are the image number and the values are the image path
6 7 8 |
# File 'lib/mangaeden_api/chapter.rb', line 6 def chapter_id @chapter_id end |
#chapter_number ⇒ Object
images is a Hash where the keys are the image number and the values are the image path
6 7 8 |
# File 'lib/mangaeden_api/chapter.rb', line 6 def chapter_number @chapter_number end |
#chapter_title ⇒ Object
images is a Hash where the keys are the image number and the values are the image path
6 7 8 |
# File 'lib/mangaeden_api/chapter.rb', line 6 def chapter_title @chapter_title end |
#images ⇒ Object
images is a Hash where the keys are the image number and the values are the image path
6 7 8 |
# File 'lib/mangaeden_api/chapter.rb', line 6 def images @images end |