Class: Phantom::SVG::Parser::AbstractImageReader
- Inherits:
-
Object
- Object
- Phantom::SVG::Parser::AbstractImageReader
- Defined in:
- lib/phantom/parser/abstract_image_reader.rb
Overview
Image reader.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#frames ⇒ Object
readonly
Returns the value of attribute frames.
-
#has_animation ⇒ Object
(also: #has_animation?)
readonly
Returns the value of attribute has_animation.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#loops ⇒ Object
readonly
Returns the value of attribute loops.
-
#skip_first ⇒ Object
readonly
Returns the value of attribute skip_first.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(path = nil, options = {}) ⇒ AbstractImageReader
constructor
Construct AbstractImageReader object.
-
#read(_path, _options = {}) ⇒ Object
Read image file from path.
Constructor Details
#initialize(path = nil, options = {}) ⇒ AbstractImageReader
Construct AbstractImageReader object.
10 11 12 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 10 def initialize(path = nil, = {}) read(path, ) end |
Instance Attribute Details
#frames ⇒ Object (readonly)
Returns the value of attribute frames.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def frames @frames end |
#has_animation ⇒ Object (readonly) Also known as: has_animation?
Returns the value of attribute has_animation.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def has_animation @has_animation end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def height @height end |
#loops ⇒ Object (readonly)
Returns the value of attribute loops.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def loops @loops end |
#skip_first ⇒ Object (readonly)
Returns the value of attribute skip_first.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def skip_first @skip_first end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
6 7 8 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 6 def width @width end |
Instance Method Details
#read(_path, _options = {}) ⇒ Object
Read image file from path.
15 16 17 |
# File 'lib/phantom/parser/abstract_image_reader.rb', line 15 def read(_path, = {}) fail 'Called abstract method.' end |