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.



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

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

Instance Attribute Details

#framesObject (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_animationObject (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

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#loopsObject (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_firstObject (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

#widthObject (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, _options = {})
  fail 'Called abstract method.'
end