Class: LinkThumbnailer::Page
- Inherits:
-
Object
- Object
- LinkThumbnailer::Page
- Defined in:
- lib/link_thumbnailer/page.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #config ⇒ Object
- #generate ⇒ Object
-
#initialize(url, options = {}) ⇒ Page
constructor
A new instance of Page.
Constructor Details
#initialize(url, options = {}) ⇒ Page
Returns a new instance of Page.
9 10 11 12 13 14 |
# File 'lib/link_thumbnailer/page.rb', line 9 def initialize(url, = {}) @url = url @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/link_thumbnailer/page.rb', line 7 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
7 8 9 |
# File 'lib/link_thumbnailer/page.rb', line 7 def source @source end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
7 8 9 |
# File 'lib/link_thumbnailer/page.rb', line 7 def url @url end |
Instance Method Details
#config ⇒ Object
21 22 23 |
# File 'lib/link_thumbnailer/page.rb', line 21 def config @config ||= ::LinkThumbnailer.config.dup end |
#generate ⇒ Object
16 17 18 19 |
# File 'lib/link_thumbnailer/page.rb', line 16 def generate @source = processor.call(url) scraper.call end |