Class: ARBookFinder::Book
- Inherits:
-
Object
- Object
- ARBookFinder::Book
- Defined in:
- lib/ar_book_finder/book.rb
Instance Attribute Summary collapse
-
#ar_points ⇒ Object
readonly
Returns the value of attribute ar_points.
-
#ar_quiz_availability ⇒ Object
readonly
Returns the value of attribute ar_quiz_availability.
-
#ar_quiz_number ⇒ Object
readonly
Returns the value of attribute ar_quiz_number.
-
#atos_book_level ⇒ Object
readonly
Returns the value of attribute atos_book_level.
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#cover ⇒ Object
readonly
Returns the value of attribute cover.
-
#interest_level ⇒ Object
readonly
Returns the value of attribute interest_level.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
-
#publishers ⇒ Object
readonly
Returns the value of attribute publishers.
-
#rating ⇒ Object
readonly
Returns the value of attribute rating.
-
#series ⇒ Object
readonly
Returns the value of attribute series.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#topics ⇒ Object
readonly
Returns the value of attribute topics.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#word_count ⇒ Object
readonly
Returns the value of attribute word_count.
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(url) ⇒ Book
constructor
A new instance of Book.
Constructor Details
#initialize(url) ⇒ Book
Returns a new instance of Book.
11 12 13 14 |
# File 'lib/ar_book_finder/book.rb', line 11 def initialize(url) @url = url @publishers = [] end |
Instance Attribute Details
#ar_points ⇒ Object (readonly)
Returns the value of attribute ar_points.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def ar_points @ar_points end |
#ar_quiz_availability ⇒ Object (readonly)
Returns the value of attribute ar_quiz_availability.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def ar_quiz_availability @ar_quiz_availability end |
#ar_quiz_number ⇒ Object (readonly)
Returns the value of attribute ar_quiz_number.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def ar_quiz_number @ar_quiz_number end |
#atos_book_level ⇒ Object (readonly)
Returns the value of attribute atos_book_level.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def atos_book_level @atos_book_level end |
#author ⇒ Object (readonly)
Returns the value of attribute author.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def @author end |
#cover ⇒ Object (readonly)
Returns the value of attribute cover.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def cover @cover end |
#interest_level ⇒ Object (readonly)
Returns the value of attribute interest_level.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def interest_level @interest_level end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def language @language end |
#publishers ⇒ Object (readonly)
Returns the value of attribute publishers.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def publishers @publishers end |
#rating ⇒ Object (readonly)
Returns the value of attribute rating.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def @rating end |
#series ⇒ Object (readonly)
Returns the value of attribute series.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def series @series end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def summary @summary end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def title @title end |
#topics ⇒ Object (readonly)
Returns the value of attribute topics.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def topics @topics end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def type @type end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def url @url end |
#word_count ⇒ Object (readonly)
Returns the value of attribute word_count.
5 6 7 |
# File 'lib/ar_book_finder/book.rb', line 5 def word_count @word_count end |
Instance Method Details
#fetch ⇒ Object
16 17 18 19 20 |
# File 'lib/ar_book_finder/book.rb', line 16 def fetch BookDetailProcessor.new(@url).process load(BookDetailParser.new(Capybara.page.html).parse) self end |