Class: Rasem::SVGTagWithParent

Inherits:
SVGTag
  • Object
show all
Defined in:
lib/rasem/svg_image.rb

Overview

Extension of SVGTag to provide a reference to the parent img (used for defs)

Direct Known Subclasses

SVGGradient, SVGImage, SVGPath, SVGRaw

Instance Attribute Summary collapse

Attributes inherited from SVGTag

#attributes, #children, #tag

Instance Method Summary collapse

Methods inherited from SVGTag

#append_child, #linearGradient, #matrix, #merge_defaults, #method_missing, #path, #pop_defaults, #push_defaults, #radialGradient, #raw, #rotate, #scale, #skewX, #skewY, #spawn_child, #to_s, #translate, #use, #validate_attribute, #validate_attributes, #validate_child_name, #validate_tag, #with_style, #write, #write_points, #write_styles, #write_transforms

Constructor Details

#initialize(img, tag, params = {}, output = nil, &block) ⇒ SVGTagWithParent

Returns a new instance of SVGTagWithParent.



393
394
395
396
# File 'lib/rasem/svg_image.rb', line 393

def initialize(img, tag, params = {}, output=nil, &block)
  @img = img
  super(tag, params, &block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rasem::SVGTag

Instance Attribute Details

#imgObject (readonly)

Returns the value of attribute img.



391
392
393
# File 'lib/rasem/svg_image.rb', line 391

def img
  @img
end