Class: Zeus::LoadTracking

Inherits:
Object
  • Object
show all
Defined in:
lib/zeus/load_tracking.rb

Class Method Summary collapse

Class Method Details

.add_feature(file) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/zeus/load_tracking.rb', line 12

def add_feature(file)
  path = if File.exist?(File.expand_path(file))
    File.expand_path(file)
  else
    find_in_load_path(file)
  end
  add_extra_feature(path) if path
end

.features_loaded_by(&block) ⇒ Object



5
6
7
8
9
10
# File 'lib/zeus/load_tracking.rb', line 5

def features_loaded_by(&block)
  old_features = all_features()
  yield
  new_features = all_features() - old_features
  return new_features
end