module RSVGR
Constants
- DEFAULT_SIZE
- UNSUPPORTED
Public Class Methods
new(args = {})
click to toggle source
# File lib/rsvgr.rb, line 11 def initialize args = {} # args[:x1] ||= 0 # args[:y1] ||= 0 # args[:x2] ||= 1 # args[:y2] ||= 1 args.each{ |k,v| instance_variable_set "@#{k}",v } end
Public Instance Methods
<<(x)
click to toggle source
# File lib/rsvgr.rb, line 111 def << x children << x self end
children()
click to toggle source
# File lib/rsvgr.rb, line 121 def children @children ||= [] end
to_s()
click to toggle source
# File lib/rsvgr.rb, line 18 def to_s raise "you have to override me, if inheriting from #{self.class} class" end
to_s_children()
click to toggle source
def to_s_children
additional_child = []
[*@children, *additional_child].map{ |child|
# File lib/rsvgr.rb, line 117 def to_s_children children.map{ |child| child.to_s.gsub /.+/, ' \0' }.join end