Class: Reader

Inherits:
Object
  • Object
show all
Includes:
R2dEngine
Defined in:
lib/r2dsvg.rb

Instance Method Summary collapse

Constructor Details

#initialize(s, model = Svgle, debug: false) ⇒ Reader

Returns a new instance of Reader.



15
16
17
18
19
20
21
22
# File 'lib/r2dsvg.rb', line 15

def initialize(s, model=Svgle, debug: false)
  
  svg, _ = RXFHelper.read(s)    
  doc = model.new(svg, debug: debug)
  @a = Render.new(doc, debug: debug).to_a    
  
  
end

Instance Method Details

#to_aObject



24
25
26
# File 'lib/r2dsvg.rb', line 24

def to_a()
  @a
end