Class: PageCrawler
- Inherits:
-
Object
- Object
- PageCrawler
- Defined in:
- lib/yamd.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#chapter ⇒ Object
readonly
Returns the value of attribute chapter.
-
#custom_data ⇒ Object
readonly
Returns the value of attribute custom_data.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#parsed_html ⇒ Object
readonly
Returns the value of attribute parsed_html.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #image_url ⇒ Object
-
#initialize(custom_data, parsed_html, number, chapter) ⇒ PageCrawler
constructor
A new instance of PageCrawler.
Constructor Details
#initialize(custom_data, parsed_html, number, chapter) ⇒ PageCrawler
Returns a new instance of PageCrawler.
9 10 11 12 13 14 15 |
# File 'lib/yamd.rb', line 9 def initialize(custom_data, parsed_html, number, chapter) @custom_data = custom_data @url = custom_data[:url] @parsed_html = parsed_html @number = number @chapter = chapter end |
Instance Attribute Details
#chapter ⇒ Object (readonly)
Returns the value of attribute chapter.
7 8 9 |
# File 'lib/yamd.rb', line 7 def chapter @chapter end |
#custom_data ⇒ Object (readonly)
Returns the value of attribute custom_data.
7 8 9 |
# File 'lib/yamd.rb', line 7 def custom_data @custom_data end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
7 8 9 |
# File 'lib/yamd.rb', line 7 def number @number end |
#parsed_html ⇒ Object (readonly)
Returns the value of attribute parsed_html.
7 8 9 |
# File 'lib/yamd.rb', line 7 def parsed_html @parsed_html end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/yamd.rb', line 7 def url @url end |
Instance Method Details
#image_url ⇒ Object
17 18 19 |
# File 'lib/yamd.rb', line 17 def image_url fail 'This method is abstract and have to be defined in a subclass.' end |