Class: Autocad::Enumerator
- Inherits:
-
Object
- Object
- Autocad::Enumerator
- Includes:
- Enumerable
- Defined in:
- lib/autocad/enumerator.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(ole, app) ⇒ Enumerator
constructor
A new instance of Enumerator.
- #reset ⇒ Object
Constructor Details
#initialize(ole, app) ⇒ Enumerator
Returns a new instance of Enumerator.
7 8 9 10 |
# File 'lib/autocad/enumerator.rb', line 7 def initialize(ole, app) @ole_obj = ole @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
5 6 7 |
# File 'lib/autocad/enumerator.rb', line 5 def app @app end |
Instance Method Details
#each ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/autocad/enumerator.rb', line 12 def each return enum_for(:each) unless block_given? @ole_obj.each do |ole| yield app.wrap(ole) end end |
#reset ⇒ Object
20 21 22 |
# File 'lib/autocad/enumerator.rb', line 20 def reset @ole_obj.reset end |