Class: Taaze::TaazeBooktags
- Inherits:
-
Object
- Object
- Taaze::TaazeBooktags
- Defined in:
- lib/taaze/tags.rb
Overview
This class get the product id as an input return a list of tags Sample input with product id : 11100763252 Sample output [‘轉型正義’, ‘白色恐怖’, ‘社會科學’, ‘臺灣民主運動’]
Constant Summary collapse
- BOOKS_URL =
'http://www.taaze.tw/sing.html?pid='
Instance Method Summary collapse
-
#initialize(book_id) ⇒ TaazeBooktags
constructor
A new instance of TaazeBooktags.
-
#tags ⇒ Object
Return a list of book’s tags.
Constructor Details
#initialize(book_id) ⇒ TaazeBooktags
Returns a new instance of TaazeBooktags.
13 14 15 |
# File 'lib/taaze/tags.rb', line 13 def initialize(book_id) parse_html(book_id) end |
Instance Method Details
#tags ⇒ Object
Return a list of book’s tags
18 19 20 |
# File 'lib/taaze/tags.rb', line 18 def ||= end |