Method: Microstation::Drawing#scan_all

Defined in:
lib/microstation/drawing.rb

#scan_all(criteria) ⇒ Object

scans all the drawing models with criteria calls scan_all_with_block calls scal_all_with_hash

Parameters:



142
143
144
145
146
147
148
149
150
151
152
153
154
# File 'lib/microstation/drawing.rb', line 142

def scan_all(criteria)
  return to_enum(__callee__, criteria) unless block_given?
  result = [] if block_given?
  each_model do |m|
    m.scan_model(criteria) do |r|
      if block_given?
        yield m, r
      else
        result << [m, r]
      end
    end
  end
end