Class: LinkThumbnailer::ImageParser
- Inherits:
-
Object
- Object
- LinkThumbnailer::ImageParser
- Defined in:
- lib/link_thumbnailer/image_parser.rb
Defined Under Namespace
Classes: NullImage
Instance Attribute Summary collapse
-
#images ⇒ Object
readonly
Returns the value of attribute images.
Instance Method Summary collapse
-
#initialize(urls) ⇒ ImageParser
constructor
A new instance of ImageParser.
- #size ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(urls) ⇒ ImageParser
Returns a new instance of ImageParser.
10 11 12 |
# File 'lib/link_thumbnailer/image_parser.rb', line 10 def initialize(urls) @images = perform? ? image_info(urls) : default_images(urls) end |
Instance Attribute Details
#images ⇒ Object (readonly)
Returns the value of attribute images.
8 9 10 |
# File 'lib/link_thumbnailer/image_parser.rb', line 8 def images @images end |
Instance Method Details
#size ⇒ Object
14 15 16 |
# File 'lib/link_thumbnailer/image_parser.rb', line 14 def size images.first.size end |
#type ⇒ Object
18 19 20 |
# File 'lib/link_thumbnailer/image_parser.rb', line 18 def type images.first.type end |