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 CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
@@ -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
@@ -257,7 +257,7 @@ describe Rasem::SVGImage do
257
257
  end
258
258
  end
259
259
  str = img.output
260
- str.should =~ %r{<group.*circle.*circle.*</group>}
260
+ str.should =~ %r{<g .*circle.*circle.*</g>}
261
261
  end
262
262
 
263
263
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
7
+ - 4
8
8
  - 0
9
- version: 0.3.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: -2737296889092417028
113
+ hash: -948951515577583612
114
114
  segments:
115
115
  - 0
116
116
  version: "0"