Class: Aozoragen::SaiZenSenFateZero

Inherits:
SaiZenSen
  • Object
show all
Defined in:
lib/aozoragen/sai-zen-sen.rb

Instance Method Summary collapse

Methods inherited from SaiZenSen

#each_chapter_local, #get_chapter_text

Methods included from Util

#detag

Constructor Details

#initialize(index_uri) ⇒ SaiZenSenFateZero

Returns a new instance of SaiZenSenFateZero.



120
121
122
123
# File 'lib/aozoragen/sai-zen-sen.rb', line 120

def initialize( index_uri )
	@index_uri = index_uri
	@index_html = Nokogiri( open( @index_uri, 'r:utf-8', &:read ) )
end

Instance Method Details

#each_chapterObject



134
135
136
# File 'lib/aozoragen/sai-zen-sen.rb', line 134

def each_chapter
	each_chapter_local( 'article a' ){|c| yield c}
end

#metainfoObject



125
126
127
128
129
130
131
132
# File 'lib/aozoragen/sai-zen-sen.rb', line 125

def metainfo
	info = {
		:id => Pathname( @index_uri.path ).basename.to_s,
		:author => ['虚淵玄']
	}
	info[:title] = (@index_html / 'h1 img')[0].attr( 'alt' )
	info
end