Class: Windows::Structures::Collection
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Windows::Structures::Collection
- Defined in:
- lib/windows/structures/collection.rb
Instance Method Summary collapse
Instance Method Details
#-(collection) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/windows/structures/collection.rb', line 10 def -(collection) diff_id = ids - collection.ids return nil if diff_id.empty? raise "I don't know which item is correct #{diff_id}" if diff_id.count != 1 find { |r| r.id == diff_id[0] } end |
#ids ⇒ Object
6 7 8 |
# File 'lib/windows/structures/collection.rb', line 6 def ids collect(&:id) end |