autocad 0.4.6 → 0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop/minitest.yml +2 -2
  3. data/.rubocop/strict.yml +4 -4
  4. data/.rubocop.yml +36 -33
  5. data/CHANGELOG.md +5 -5
  6. data/LICENSE.txt +21 -21
  7. data/README.md +134 -39
  8. data/Rakefile +26 -10
  9. data/exe/autocad +3 -3
  10. data/gemfiles/rubocop.gemfile +2 -1
  11. data/lib/autocad/app.rb +127 -28
  12. data/lib/autocad/arc.rb +3 -0
  13. data/lib/autocad/block.rb +11 -6
  14. data/lib/autocad/block_reference.rb +33 -4
  15. data/lib/autocad/bounding_box.rb +202 -0
  16. data/lib/autocad/dim_style.rb +4 -0
  17. data/lib/autocad/drawing.rb +873 -172
  18. data/lib/autocad/element.rb +217 -25
  19. data/lib/autocad/errors.rb +9 -0
  20. data/lib/autocad/filter.rb +502 -168
  21. data/lib/autocad/layer.rb +129 -41
  22. data/lib/autocad/layout.rb +120 -0
  23. data/lib/autocad/line.rb +154 -55
  24. data/lib/autocad/message_box.rb +95 -95
  25. data/lib/autocad/model.rb +217 -89
  26. data/lib/autocad/mtext.rb +189 -110
  27. data/lib/autocad/plot.rb +45 -0
  28. data/lib/autocad/plot_configuration.rb +372 -0
  29. data/lib/autocad/point.rb +7 -0
  30. data/lib/autocad/point3d.rb +18 -11
  31. data/lib/autocad/pviewport.rb +136 -21
  32. data/lib/autocad/selection_filter.rb +358 -180
  33. data/lib/autocad/selection_set.rb +140 -61
  34. data/lib/autocad/selection_set_adapter.rb +187 -8
  35. data/lib/autocad/spline.rb +27 -0
  36. data/lib/autocad/text.rb +66 -11
  37. data/lib/autocad/text_style.rb +4 -0
  38. data/lib/autocad/version.rb +1 -1
  39. data/lib/autocad/viewport.rb +57 -0
  40. data/lib/autocad.rb +126 -30
  41. data/lib/faa/cleanup.rb +137 -0
  42. data/lib/win32ole_helper.rb +52 -0
  43. data/rbs_collection.lock.yaml +38 -18
  44. data/sig/generated/autocad/app.rbs +278 -251
  45. data/sig/generated/autocad/arc.rbs +6 -3
  46. data/sig/generated/autocad/block.rbs +8 -5
  47. data/sig/generated/autocad/block_reference.rbs +99 -59
  48. data/sig/generated/autocad/bounding_box.rbs +78 -0
  49. data/sig/generated/autocad/dim_style.rbs +6 -0
  50. data/sig/generated/autocad/drawing.rbs +597 -158
  51. data/sig/generated/autocad/element.rbs +233 -166
  52. data/sig/generated/autocad/errors.rbs +29 -23
  53. data/sig/generated/autocad/filter.rbs +388 -60
  54. data/sig/generated/autocad/layer.rbs +76 -19
  55. data/sig/generated/autocad/layout.rbs +64 -0
  56. data/sig/generated/autocad/line.rbs +128 -25
  57. data/sig/generated/autocad/message_box.rbs +81 -81
  58. data/sig/generated/autocad/model.rbs +115 -41
  59. data/sig/generated/autocad/mtext.rbs +123 -0
  60. data/sig/generated/autocad/plot.rbs +26 -0
  61. data/sig/generated/autocad/plot_configuration.rbs +176 -0
  62. data/sig/generated/autocad/point.rbs +7 -0
  63. data/sig/generated/autocad/point3d.rbs +70 -66
  64. data/sig/generated/autocad/pviewport.rbs +64 -0
  65. data/sig/generated/autocad/selection_filter.rbs +226 -50
  66. data/sig/generated/autocad/selection_set.rbs +112 -37
  67. data/sig/generated/autocad/selection_set_adapter.rbs +235 -28
  68. data/sig/generated/autocad/spline.rbs +22 -0
  69. data/sig/generated/autocad/text.rbs +66 -7
  70. data/sig/generated/autocad/text_style.rbs +6 -0
  71. data/sig/generated/autocad/viewport.rbs +19 -2
  72. data/sig/generated/autocad.rbs +140 -68
  73. data/sig/generated/faa/cleanup.rbs +53 -0
  74. data/sig/generated/win32ole_helper.rbs +9 -0
  75. data/sig/prototype/lib/autocad/app.rbs +3 -1
  76. data/sig/prototype/lib/autocad/bounding_box.rbs +15 -0
  77. data/sig/prototype/lib/autocad/drawing.rbs +6 -0
  78. data/sig/prototype/lib/autocad/layer.rbs +5 -0
  79. data/sig/prototype/lib/autocad/viewport.rbs +7 -0
  80. data/sig/prototype/lib/autocad.rbs +1 -1
  81. metadata +29 -5
  82. data/event_handler.log +0 -24
  83. data/sig/generated/autocad/text_node.rbs +0 -37
@@ -0,0 +1,372 @@
1
+ module Autocad
2
+ class PlotConfiguration < Element
3
+ # Get the name of the plot configuration
4
+ # @rbs return String
5
+ def name
6
+ @ole_obj.Name
7
+ end
8
+
9
+ # Set the plot device configuration file
10
+ # @rbs name: String
11
+ # @rbs return void
12
+ def device_name=(name)
13
+ @ole_obj.ConfigName = name
14
+ end
15
+
16
+ # Get the current plot device configuration name
17
+ # @rbs return String
18
+ def device_name
19
+ @ole_obj.ConfigName
20
+ end
21
+
22
+ # Read current configuration properties from OLE object
23
+ # @rbs return Hash[Symbol, Object]
24
+ def read_ole(ole = nil)
25
+ {device_name: ole_obj.ConfigName,
26
+ media_name: ole_obj.CanonicalMediaName,
27
+ style_sheet: ole_obj.StyleSheet,
28
+ plot_type: plot_type_ole_to_sym(ole_obj.PlotType),
29
+ rotation: rotation_ole_to_degree(ole_obj.PlotRotation),
30
+ paper_units: paper_units_from_ole(ole_obj.PaperUnits)}
31
+ end
32
+
33
+ # Write configuration settings to OLE object
34
+ # @rbs value: Hash[Symbol, Object]
35
+ # @rbs return void
36
+ def write_ole(value)
37
+ ole_obj.ConfigName = value[:device_name]
38
+ ole_obj.CanonicalMediaName = value[:media_name]
39
+ ole_obj.StyleSheet = value[:style_sheet]
40
+ ole_obj.PlotType = plot_type_to_ole(value[:plot_type])
41
+ ole_obj.PlotRotation = rotation_degree_to_ole(value[:rotation])
42
+ ole_obj.PaperUnits = paper_units_to_ole(value[:paper_units])
43
+ end
44
+
45
+ # Get plot origin point in millimeters
46
+ # @rbs return Point3d
47
+ def plot_origin
48
+ Point3d.new(ole_obj.PlotOrigin)
49
+ end
50
+
51
+ # Set plot origin point
52
+ # @rbs ...: Numeric | Array[Numeric] | Point3d
53
+ # @rbs return void
54
+ # @raise [ArgumentError] For invalid coordinate values
55
+ def plot_origin=(...)
56
+ origin = Point3d.new(...)
57
+ ole_obj.PlotOrigin = origin.to_ole
58
+ rescue StandardError => e
59
+ app.error_proc.call(e, self)
60
+ end
61
+
62
+ # Get current plot style mode
63
+ # @rbs return Symbol
64
+ def plot_style_mode
65
+ style = drawing.get_variable('pstylemode')
66
+ case style
67
+ when 0
68
+ :named_style_mode
69
+ else
70
+ :color_style_mode
71
+ end
72
+ end
73
+
74
+ def plot_style_mode_variable
75
+ drawing.get_variable('pstylemode')
76
+ end
77
+
78
+ # Check if using color-dependent plot styles
79
+ # @rbs return bool
80
+ def color_style_mode?
81
+ plot_style_mode == :color_style_mode
82
+ end
83
+
84
+ # Check if using named plot styles
85
+ # @rbs return bool
86
+ def named_style_mode?
87
+ plot_style_mode == :named_style_mode
88
+ end
89
+
90
+ # Configure multiple plot settings at once
91
+ # @rbs kwargs: Hash{Symbol => Object} -- See write_ole for valid keys
92
+ # @rbs return void
93
+ # @example Configure for PDF output
94
+ # setup(
95
+ # device_name: "AutoCAD PDF.pc3",
96
+ # media_name: "ANSI_D",
97
+ # style_sheet: "monochrome.ctb",
98
+ # plot_type: :layout
99
+ # )
100
+ def setup(...)
101
+ write_ole(...)
102
+ end
103
+
104
+ # Update configuration with merged values
105
+ # @rbs value: Hash{Symbol => Object} -- Partial configuration updates
106
+ # @rbs return void
107
+ def update(value)
108
+ merged_value = original.merge(value)
109
+ super(merged_value)
110
+ rescue StandardError => e
111
+ binding.irb
112
+ end
113
+
114
+ # Print current configuration to console
115
+ # @rbs return void
116
+ def display_setup
117
+ original.each { |k, v| puts "#{k}: #{v}" }
118
+ puts "plot_style_mode: #{plot_style_mode}"
119
+ end
120
+
121
+ # Copy settings from another configuration
122
+ # @rbs pc: PlotConfiguration -- Source configuration
123
+ # @rbs return void
124
+ def copy_plot_configuration(pc)
125
+ ole_obj.CopyFrom(pc.ole_obj)
126
+ end
127
+
128
+ def plot_style_mode=(sym)
129
+ style = case sym
130
+ when :named, :named_style, :named_style_mode
131
+ 0
132
+ when :color, :color_style, :color_style_mode
133
+ 1
134
+ else
135
+ raise 'need either :named or :color'
136
+ end
137
+ drawing.set_variable('pstylemode', style)
138
+ end
139
+
140
+ # ANSI B landscape paper size name
141
+ # @rbs return String -- Canonical name "ANSI_B_(17.00_x_11.00_Inches)"
142
+ def ansi_b_landscape
143
+ 'ANSI_B_(17.00_x_11.00_Inches)'
144
+ end
145
+
146
+ def ansi_d_landscape
147
+ 'ANSI_D_(34.00_x_22.00_Inches)'
148
+ end
149
+
150
+ # Refresh plot device information
151
+ # @rbs return void
152
+ # @note Required after changing device configurations
153
+ def refresh
154
+ @ole_obj.RefreshPlotDeviceInfo
155
+ end
156
+
157
+ def style_sheet=(style)
158
+ ole_obj.StyleSheet = style
159
+ end
160
+
161
+ def style_sheet
162
+ ole_obj.StyleSheet
163
+ end
164
+
165
+ # The media devices available to for plotting
166
+ # @rbs return Array[String]
167
+ def device_names
168
+ refresh
169
+ @ole_obj.GetPlotDeviceNames
170
+ end
171
+
172
+ # The current device_name for printing as its Canonomical Name
173
+ # use this name when changing
174
+ # @rbs return String
175
+ def canonical_media_name
176
+ @ole_obj.CanonicalMediaName
177
+ end
178
+
179
+ def canonomical_media_name=(name)
180
+ @ole_obj.CanonicalMediaName = name
181
+ end
182
+
183
+ # The available paper sizes for the configured device. Use this
184
+ # when setting the media_name:
185
+ # @rbs return Array[String]
186
+ # @note Call refresh() first if device was changed
187
+ def media_names
188
+ refresh
189
+ @ole_obj.GetCanonicalMediaNames
190
+ end
191
+
192
+ def locale_media_name
193
+ @ole_obj.GetLocaleMediaName(canonical_media_name)
194
+ end
195
+
196
+ # Returns the different plot tables. Use one of these
197
+ # when setting style_sheet
198
+ # @rbs return Array[String] -- CTB/STB file names
199
+ def plot_style_table_names
200
+ refresh
201
+ @ole_obj.GetPlotStyleTableNames
202
+ end
203
+
204
+ # The different plot bounds or types
205
+ # @rbs return Array[Symbol]
206
+ def plot_types
207
+ %i[display extents layout limits view window]
208
+ end
209
+
210
+ # @rbs return Array[Float, Float] -- the numerator and denominator for a custom scale
211
+ def custom_scale
212
+ numerator = WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_BYREF | WIN32OLE::VARIANT::VT_R8)
213
+ denominator = WIN32OLE_VARIANT.new(nil, WIN32OLE::VARIANT::VT_BYREF | WIN32OLE::VARIANT::VT_R8)
214
+ @ole_obj.GetCustomScale(numerator, denominator)
215
+ [numerator.value, denominator.value]
216
+ end
217
+
218
+ # The different paper units
219
+ # @rbs return Array[Symbol]
220
+ def paper_units_types
221
+ %i[inches mm pixels]
222
+ end
223
+
224
+ # Get current paper units
225
+ # @rbs return Symbol -- :inches, :mm, or :pixels
226
+ def paper_units
227
+ paper_units_from_ole(@ole_obj.PaperUnits)
228
+ end
229
+
230
+ # Conversion factor to millimeters based on paper units
231
+ # @rbs return Float
232
+ # @example
233
+ # inches: 25.4 (mm per inch)
234
+ # pixels: 25.4/96 (mm per pixel at 96 DPI)
235
+ def paper_units_scale_factor
236
+ unit = paper_units
237
+ case unit
238
+
239
+ when :inches
240
+ 25.4
241
+
242
+ when :mm
243
+ 1
244
+
245
+ # pixel to mm
246
+ when :pixels
247
+ 25.4 / 96.0
248
+ end
249
+ end
250
+
251
+ private
252
+
253
+ # Convert paper units symbol to OLE constant
254
+ # @rbs unit: Symbol -- Valid values: :inches, :mm, :pixels
255
+ # @rbs return Integer -- OLE constant (ACAD::Ac*)
256
+ # @raise [ArgumentError] For invalid paper units
257
+ def paper_units_to_ole(unit)
258
+ case unit
259
+
260
+ when :inches
261
+
262
+ ACAD::AcInches
263
+
264
+ when :pixels
265
+
266
+ ACAD::AcPixels
267
+
268
+ when :mm
269
+
270
+ ACAD::AcMillimeters
271
+
272
+ end
273
+ end
274
+
275
+ # Convert OLE paper units constant to symbol
276
+ # @rbs unit: Integer -- OLE constant (ACAD::Ac*)
277
+ # @rbs return Symbol -- :inches, :mm, or :pixels
278
+ def paper_units_from_ole(unit)
279
+ case unit
280
+
281
+ when ACAD::AcInches
282
+
283
+ :inches
284
+
285
+ when ACAD::AcPixels
286
+
287
+ :pixels
288
+
289
+ when ACAD::AcMillimeters
290
+
291
+ :mm
292
+
293
+ end
294
+ end
295
+
296
+ # Convert rotation degrees to OLE constant
297
+ # @rbs degree: Integer -- Valid values: 0, 90, 180, 270
298
+ # @rbs return Integer -- OLE constant (ACAD::Ac*degrees)
299
+ # @raise [ArgumentError] For invalid rotation values
300
+ def rotation_degree_to_ole(degree)
301
+ case degree
302
+ when 0
303
+ ACAD::Ac0degrees
304
+ when 90
305
+ ACAD::Ac90degrees
306
+ when 180
307
+ ACAD::Ac180degrees
308
+ when 270
309
+ ACAD::Ac270degrees
310
+ end
311
+ end
312
+
313
+ # Convert OLE rotation constant to degrees
314
+ # @rbs rot: Integer -- OLE constant (ACAD::Ac*degrees)
315
+ # @rbs return Integer -- 0, 90, 180, or 270
316
+ def rotation_ole_to_degree(rot)
317
+ case rot
318
+
319
+ when ACAD::Ac0degrees
320
+ 0
321
+ when ACAD::Ac90degrees
322
+ 90
323
+ when ACAD::Ac180degrees
324
+ 180
325
+ when ACAD::Ac270degrees
326
+ 270
327
+ end
328
+ end
329
+
330
+ # Convert OLE plot type constant to symbol
331
+ # @rbs typ: Integer -- OLE constant (ACAD::Ac*)
332
+ # @rbs return Symbol -- :display, :extents, :layout, :limits, :view, or :window
333
+ def plot_type_ole_to_sym(typ)
334
+ case typ
335
+ when ACAD::AcDisplay
336
+ :display
337
+ when ACAD::AcExtents
338
+ :extents
339
+ when ACAD::AcLayout
340
+ :layout
341
+ when ACAD::AcLimits
342
+ :limits
343
+ when ACAD::AcView
344
+ :view
345
+ when ACAD::AcWindow
346
+ :window
347
+ end
348
+ end
349
+
350
+ # Convert plot type symbol to OLE constant
351
+ # @rbs typ: Symbol -- Valid values:
352
+ # :display, :extents, :layout, :limits, :view, :window
353
+ # @rbs return Integer -- OLE constant (ACAD::Ac*)
354
+ # @raise [ArgumentError] For invalid plot types
355
+ def plot_type_to_ole(typ)
356
+ case typ
357
+ when :display
358
+ ACAD::AcDisplay
359
+ when :extents
360
+ ACAD::AcExtents
361
+ when :layout
362
+ ACAD::AcLayout
363
+ when :limits
364
+ ACAD::AcLimits
365
+ when :view
366
+ ACAD::AcView
367
+ when :window
368
+ ACAD::AcWindow
369
+ end
370
+ end
371
+ end
372
+ end
@@ -0,0 +1,7 @@
1
+ module Autocad
2
+ class Point < Element
3
+ def coordinates
4
+ Point3d(ole_obj.Coordinates)
5
+ end
6
+ end
7
+ end
@@ -3,6 +3,11 @@
3
3
  module Autocad
4
4
  class Point3d
5
5
  class << self
6
+ # @rbs return Point3d -- return a Point3d at [0,0,0]
7
+ def zero
8
+ new(0.0, 0.0, 0, 0)
9
+ end
10
+
6
11
  def cartesian_to_polar(x, y)
7
12
  r = Math.sqrt(x * x + y * y)
8
13
  angle = Angle.radians(Math.atan2(y, x))
@@ -91,7 +96,7 @@ module Autocad
91
96
  {x: @x, y: @y, z: @z}
92
97
  end
93
98
 
94
- # @rbs return [Float,Float, Float]
99
+ # @rbs return [
95
100
  def to_ary
96
101
  [x, y, z]
97
102
  end
@@ -110,6 +115,17 @@ module Autocad
110
115
  [x, y]
111
116
  end
112
117
 
118
+ # @rbs model_space: bool
119
+ # @return Autocad::Point
120
+ def to_acad_point(model_space = true)
121
+ ole = if model_space
122
+ drawing.ModelSpace.AddPoint(x, y, z)
123
+ else
124
+ drawing.PaperSpace.AddPoint(x, y, z)
125
+ end
126
+ app.wrap(ole)
127
+ end
128
+
113
129
  def xy_bounds(other)
114
130
  x2, y2 = Points3d.new(other).to_xy
115
131
  [x, y, x2, y, x2, y2, x, y2, x, y]
@@ -124,20 +140,11 @@ module Autocad
124
140
  [x, y, z]
125
141
  end
126
142
 
127
- # @rbs return Point3d -- return a Point3d at [0,0,0]
128
- def zero
129
- new(0.0, 0.0, 0, 0)
130
- end
131
-
132
143
  def to_cartesian
133
144
  end
134
145
 
135
146
  def to_ole
136
- ole = WIN32OLE::Variant.array([3], WIN32OLE::VARIANT::VT_R8)
137
- ole[0] = x
138
- ole[1] = y
139
- ole[z] = z
140
- ole
147
+ WIN32OLE::Variant.new([x, y, z], WIN32OLE::VARIANT::VT_ARRAY | WIN32OLE::VARIANT::VT_R8)
141
148
  end
142
149
  end
143
150
  end
@@ -1,21 +1,136 @@
1
- require_relative "element"
2
-
3
- module Autocad
4
- class PViewport < Element
5
- def width
6
- @ole_obj.Width
7
- end
8
-
9
- def height
10
- @ole_obj.Height
11
- end
12
-
13
- def each
14
- return enum_for(:each) unless block_given?
15
-
16
- @ole_obj.each do |ole|
17
- yield app.wrap(ole)
18
- end
19
- end
20
- end
21
- end
1
+ require_relative 'element'
2
+
3
+ module Autocad
4
+ class PViewport < Element
5
+ # the viewport width
6
+ # @rbs return Float
7
+ def width
8
+ @ole_obj.Width
9
+ end
10
+
11
+ def width_inches
12
+ width / 25.4
13
+ end
14
+
15
+ def height_inches
16
+ height / 25.4
17
+ end
18
+
19
+ def pviewport?
20
+ true
21
+ end
22
+
23
+ # change the viewport to front_view direction
24
+ def front_view
25
+ view_direction = Point3d(0, -1, 0)
26
+ ole_obj.Direction = view_direction.to_ole
27
+ end
28
+
29
+ def top_view
30
+ view_direction = Point3d(0, 0, 1)
31
+ ole_obj.Direction = view_direction.to_ole
32
+ end
33
+
34
+ def right_view
35
+ view_direction = Point3d(1, 0, 0)
36
+ ole_obj.Direction = view_direction.to_ole
37
+ end
38
+
39
+ def isometric_view
40
+ view_direction = Point3d(1, 1, 1)
41
+ ole_obj.Direction = view_direction.to_ole
42
+ end
43
+
44
+ # the viewport height
45
+ # @rbs return Float
46
+ def height
47
+ @ole_obj.Height
48
+ end
49
+
50
+ # @rbs return bool
51
+ def on?
52
+ @ole_obj.ViewPortOn
53
+ end
54
+
55
+ # turn on the view
56
+ # @rbs return void
57
+ def on
58
+ @ole_obj.Display(true)
59
+ end
60
+
61
+ # turn of the display of viewport
62
+ # @rbs return void
63
+ def off
64
+ @ole_obj.Display(false)
65
+ end
66
+
67
+ # the standard scale from Autocad AcViewportScale enum converted to symbol
68
+ # @rbs return Symbol
69
+ def standard_scale
70
+ ole = @ole_obj.StandardScale
71
+ standard_scale_ole_to_symbol(ole)
72
+ end
73
+
74
+ def standard_scale=(scale)
75
+ if scale.is_a?(Symbol)
76
+ ole = standard_scale_symbol_to_ole(scale)
77
+ @ole_obj.StandardScale = ole
78
+ else
79
+ @ole_obj.StandardScale = scale
80
+ end
81
+ end
82
+
83
+ def standard_scale_ole_to_symbol(scale)
84
+ case scale
85
+ when ACAD::AcVpScaleToFit then :scale_to_fit
86
+ when ACAD::AcVpCustomScale then :custom
87
+ when ACAD::AcVp1_128in_1ft then :"128_to_1"
88
+ when ACAD::AcVp1_64in_1ft then :"64_to_1"
89
+ when ACAD::AcVp1_32in_1ft then :"32_to_1"
90
+ when ACAD::AcVp1_16in_1ft then :"16_to_1"
91
+ when ACAD::AcVp1_8in_1ft then :"8_to_1"
92
+ end
93
+ end
94
+
95
+ def standard_scale_symbol_to_ole(scale)
96
+ case scale
97
+ when :scale_to_fit then ACAD::AcVpScaleToFit
98
+ when :custom then ACAD::AcVpCustomScale
99
+ when :"128_to_1" then ACAD::AcVp1_128in_1ft
100
+ when :"64_to_1" then ACAD::AcVp1_64in_1ft
101
+ when :"32_to_1" then ACAD::AcVp1_32in_1ft
102
+ when :"16_to_1" then ACAD::AcVp1_16in_1ft
103
+ when :"8_to_1" then ACAD::AcVp1_8in_1ft
104
+ end
105
+ end
106
+
107
+ # set a custom scale for model objects
108
+ # @rbs scale: Float
109
+ def custom_scale=(scale)
110
+ @ole_obj.CustomScale = scale
111
+ end
112
+
113
+ def lock_display
114
+ @ole_obj.DisplayLocked = true
115
+ end
116
+
117
+ # specifies the lock stat fo the viewports display. When locked, cant
118
+ # change view
119
+ # @rbs return bool
120
+ def display_locked?
121
+ @ole_obj.DisplayLocked
122
+ end
123
+
124
+ def unlock_display
125
+ @ole_obj.DisplayLocked = false
126
+ end
127
+
128
+ def each
129
+ return enum_for(:each) unless block_given?
130
+
131
+ @ole_obj.each do |ole|
132
+ yield app.wrap(ole)
133
+ end
134
+ end
135
+ end
136
+ end