Class: SVGPlot::Raw

Inherits:
ChildTag show all
Defined in:
lib/svgplot/tag.rb

Overview

Raw child, just prints data provided

Instance Attribute Summary

Attributes inherited from ChildTag

#img

Attributes inherited from Tag

#attributes, #children, #defaults, #tag

Instance Method Summary collapse

Methods inherited from ChildTag

#linear_gradient, #radial_gradient

Methods inherited from Tag

#append_child, #method_missing, #path, #raw, #respond_to?, #spawn_child, #to_s, #use

Methods included from Expansion

#expand

Methods included from Transform

#matrix, #rotate, #scale, #skew_x, #skew_y, #translate

Constructor Details

#initialize(img, data) ⇒ Raw

Returns a new instance of Raw.



112
113
114
115
# File 'lib/svgplot/tag.rb', line 112

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 SVGPlot::Tag

Instance Method Details

#write(output) ⇒ Object



117
118
119
# File 'lib/svgplot/tag.rb', line 117

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