Class: Svgcode::SVG::Path

Inherits:
Object
  • Object
show all
Defined in:
lib/svgcode/svg/path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ Path



8
9
10
# File 'lib/svgcode/svg/path.rb', line 8

def initialize(str)
  @commands = str.split(/(?=[a-z])/i).collect { |s| Command.new(s) }
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



6
7
8
# File 'lib/svgcode/svg/path.rb', line 6

def commands
  @commands
end