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.
12 13 14 15 16 17 |
# File 'lib/link_thumbnailer/page.rb', line 12 def initialize(url, = {}) @url = url @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/link_thumbnailer/page.rb', line 10 def @options end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
10 11 12 |
# File 'lib/link_thumbnailer/page.rb', line 10 def source @source end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'lib/link_thumbnailer/page.rb', line 10 def url @url end |
Instance Method Details
#config ⇒ Object
24 25 26 |
# File 'lib/link_thumbnailer/page.rb', line 24 def config @config ||= ::LinkThumbnailer.config.dup end |
#generate ⇒ Object
19 20 21 22 |
# File 'lib/link_thumbnailer/page.rb', line 19 def generate @source = processor.call(url) scraper.call end |