Class: Svgcode::SVG::Path
- Inherits:
-
Object
- Object
- Svgcode::SVG::Path
- Defined in:
- lib/svgcode/svg/path.rb
Instance Attribute Summary collapse
-
#commands ⇒ Object
readonly
Returns the value of attribute commands.
Instance Method Summary collapse
-
#initialize(str) ⇒ Path
constructor
A new instance of Path.
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
#commands ⇒ Object (readonly)
Returns the value of attribute commands.
6 7 8 |
# File 'lib/svgcode/svg/path.rb', line 6 def commands @commands end |