Class: Phantom::SVG::Parser::AbstractImageReader

Inherits:
Object
  • Object
show all
Defined in:
lib/phantom/parser/abstract_image_reader.rb

Overview

Image reader.

Direct Known Subclasses

GIFReader, JPEGReader, PNGReader, SVGReader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path = nil, options = {}) ⇒ AbstractImageReader

Construct AbstractImageReader object.



11
12
13
# File 'lib/phantom/parser/abstract_image_reader.rb', line 11

def initialize(path = nil, options = {})
  read(path, options)
end

Instance Attribute Details

#framesObject (readonly)

Returns the value of attribute frames.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def frames
  @frames
end

#has_animationObject (readonly) Also known as: has_animation?

Returns the value of attribute has_animation.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def has_animation
  @has_animation
end

#heightObject (readonly)

Returns the value of attribute height.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def height
  @height
end

#loopsObject (readonly)

Returns the value of attribute loops.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def loops
  @loops
end

#skip_firstObject (readonly)

Returns the value of attribute skip_first.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def skip_first
  @skip_first
end

#widthObject (readonly)

Returns the value of attribute width.



7
8
9
# File 'lib/phantom/parser/abstract_image_reader.rb', line 7

def width
  @width
end

Instance Method Details

#read(_path, _options = {}) ⇒ Object

Read image file from path.



16
17
18
# File 'lib/phantom/parser/abstract_image_reader.rb', line 16

def read(_path, _options = {})
  fail 'Called abstract method.'
end