diff options
| author | mo khan <mo@mokhan.ca> | 2015-04-08 14:34:51 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-04-08 14:34:51 -0600 |
| commit | 214a6e5b5dd5013424394c6ed19b3dcb29a9ddde (patch) | |
| tree | e78581fd81dc2df5a37c325b9b4c9bc519e68d24 | |
| parent | 098a36a873a5ce58f19cd857cafda4f04f1427ae (diff) | |
add a line.
| -rw-r--r-- | lib/scale.rb | 1 | ||||
| -rw-r--r-- | lib/scale/shapes/line.rb | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/scale.rb b/lib/scale.rb index dd41d40..5f65202 100644 --- a/lib/scale.rb +++ b/lib/scale.rb @@ -4,6 +4,7 @@ require "scale/svg" require "scale/shapes/rectangle" require "scale/shapes/circle" require "scale/shapes/ellipse" +require "scale/shapes/line" require "scale/text" require "scale/dsl" diff --git a/lib/scale/shapes/line.rb b/lib/scale/shapes/line.rb new file mode 100644 index 0000000..7aaf782 --- /dev/null +++ b/lib/scale/shapes/line.rb @@ -0,0 +1,13 @@ +module Scale + class Line + include Node + attribute :x1, Integer # the x position of point 1 + attribute :y1, Integer # the y position of point 1 + attribute :x2, Integer # the x position of point 2 + attribute :y2, Integer # the y position of point 2 + + def xml_tag + :circle + end + end +end |
