Class: Orthoses::ObjectSpaceAll
- Inherits:
-
Object
- Object
- Orthoses::ObjectSpaceAll
- Defined in:
- lib/orthoses/object_space_all.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(loader) ⇒ ObjectSpaceAll
constructor
A new instance of ObjectSpaceAll.
Constructor Details
#initialize(loader) ⇒ ObjectSpaceAll
Returns a new instance of ObjectSpaceAll.
5 6 7 |
# File 'lib/orthoses/object_space_all.rb', line 5 def initialize(loader) @loader = loader end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/orthoses/object_space_all.rb', line 9 def call store = @loader.call after_modules = ObjectSpace.each_object(Module).to_a after_modules.each do |mod| mod_name = Utils.module_name(mod) next if mod_name.nil? store[mod_name] end store end |