rasem 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rasem/svg_image.rb +11 -0
- data/spec/rasem_spec.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/lib/rasem/svg_image.rb
CHANGED
@@ -89,6 +89,17 @@ class Rasem::SVGImage
|
|
89
89
|
# Pop style again to revert changes
|
90
90
|
@default_styles.pop
|
91
91
|
end
|
92
|
+
|
93
|
+
def group(style={}, &proc)
|
94
|
+
# Open the group
|
95
|
+
@output << "<g"
|
96
|
+
write_style(style)
|
97
|
+
@output << ">"
|
98
|
+
# Call the block
|
99
|
+
self.instance_exec(&proc)
|
100
|
+
# Close the group
|
101
|
+
@output << "</g>"
|
102
|
+
end
|
92
103
|
|
93
104
|
private
|
94
105
|
# Creates an object for ouput out of an argument
|
data/spec/rasem_spec.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 4
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.4.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ahmed Eldawy
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
requirements:
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
|
-
hash: -
|
113
|
+
hash: -948951515577583612
|
114
114
|
segments:
|
115
115
|
- 0
|
116
116
|
version: "0"
|