class ANN_Manga
Attributes
ann_manga[W]
ann_anime Nokogiri object
Public Class Methods
new(ann_manga)
click to toggle source
# File lib/ann_wrapper/ann_manga.rb, line 7 def initialize(ann_manga) @ann_manga = ann_manga # information available from detail @info = Hash.new @info[:title] = "Main title" @info[:synopsis] = "Plot Summary" @info[:genres] = "Genres" @info[:vintage] = "Vintage" @info[:themes] = "Themes" @info[:num_tankoubon] = "Number of tankoubon" @info[:num_pages] = "Number of pages" # create methods create_methods(@ann_manga, @info) end
Public Instance Methods
find_info(key)
click to toggle source
@return [Nokogiri::XML::NodeSet] return all info with provided key
Calls superclass method
ANN_Media#find_info
# File lib/ann_wrapper/ann_manga.rb, line 25 def find_info(key) super(@ann_manga, key) end
id()
click to toggle source
@return [String] returns manga id
# File lib/ann_wrapper/ann_manga.rb, line 30 def id @id ||= @ann_manga['id'] end
num_pages()
click to toggle source
@return [[String]] returns the number of tankoubon
# File lib/ann_wrapper/ann_manga.rb, line 62 def num_pages; end
num_tankoubon()
click to toggle source
@return [[String]] returns the number of tankoubon
# File lib/ann_wrapper/ann_manga.rb, line 59 def num_tankoubon; end
ratings()
click to toggle source
@return [[ANN_Rating]] returns array of ANN_Episode
Calls superclass method
ANN_Media#ratings
# File lib/ann_wrapper/ann_manga.rb, line 45 def ratings super @ann_manga end
staff()
click to toggle source
@return [[ANN_Staff]] returns array of ANN_Staff
Calls superclass method
ANN_Media#staff
# File lib/ann_wrapper/ann_manga.rb, line 40 def staff super @ann_manga end
to_h()
click to toggle source
@return [Hash] hash of self
# File lib/ann_wrapper/ann_manga.rb, line 50 def to_h # create hash excluding some methods to_hash([:to_h, :ann_manga=, :find_info]) end
type()
click to toggle source
@return [String] returns manga type
# File lib/ann_wrapper/ann_manga.rb, line 35 def type @type ||= @ann_manga['type'] end