Class: Nlg::Extractors::BookExtractor
- Defined in:
- lib/bookshark/extractors/nlg/book_extractor.rb
Instance Attribute Summary collapse
-
#book ⇒ Object
readonly
Returns the value of attribute book.
Attributes inherited from Base
Instance Method Summary collapse
- #extract_book(nlg_id = @nlg_id, book_page = @page) ⇒ Object
-
#initialize(id = nil) ⇒ BookExtractor
constructor
A new instance of BookExtractor.
- #load_and_extract_book(id = nil) ⇒ Object
Methods inherited from Base
decode_text, #decode_text, #load_page, #load_page_by_id, #present?
Constructor Details
#initialize(id = nil) ⇒ BookExtractor
Returns a new instance of BookExtractor.
12 13 14 15 |
# File 'lib/bookshark/extractors/nlg/book_extractor.rb', line 12 def initialize(id=nil) super(id) extract_book unless id.nil? or @page.nil? end |
Instance Attribute Details
#book ⇒ Object (readonly)
Returns the value of attribute book.
10 11 12 |
# File 'lib/bookshark/extractors/nlg/book_extractor.rb', line 10 def book @book end |
Instance Method Details
#extract_book(nlg_id = @nlg_id, book_page = @page) ⇒ Object
22 23 24 |
# File 'lib/bookshark/extractors/nlg/book_extractor.rb', line 22 def extract_book(nlg_id=@nlg_id, book_page=@page) puts "should extract book #{nlg_id} from nlg" end |
#load_and_extract_book(id = nil) ⇒ Object
17 18 19 20 |
# File 'lib/bookshark/extractors/nlg/book_extractor.rb', line 17 def load_and_extract_book(id=nil) load_page(id) extract_book unless id.nil? or @page.nil? end |