Class: Wallaby::Her::ModelFinder

Inherits:
ModelFinder
  • Object
show all
Defined in:
lib/adapters/wallaby/her/model_finder.rb

Overview

Model finder

Instance Method Summary collapse

Instance Method Details

#allArray<Class>

Find out all the classes that include Her::Model

Returns:

  • (Array<Class>)

    a list of Her classes



9
10
11
12
13
14
15
# File 'lib/adapters/wallaby/her/model_finder.rb', line 9

def all
  ObjectSpace
    .each_object(Class)
    .select do |klass|
      klass < ::Her::Model && !ModuleUtils.anonymous_class?(klass)
    end
end