Class: Rasem::SVGRaw

Inherits:
SVGTagWithParent show all
Defined in:
lib/rasem/svg_image.rb

Overview

inherit from tag for basic functionality, control raw data using the write method

Instance Attribute Summary

Attributes inherited from SVGTagWithParent

#img

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_points, #write_styles, #write_transforms

Constructor Details

#initialize(img, data) ⇒ SVGRaw

Returns a new instance of SVGRaw.



405
406
407
408
# File 'lib/rasem/svg_image.rb', line 405

def initialize(img, data)
  @img = img
  @data = data
end

Dynamic Method Handling

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

Instance Method Details

#write(output) ⇒ Object



411
412
413
# File 'lib/rasem/svg_image.rb', line 411

def write(output)
  output << @data.to_s
end