Module: Uprb::RequireTracker
- Defined in:
- lib/uprb/require_tracker.rb
Class Attribute Summary collapse
-
.mapping ⇒ Object
readonly
Returns the value of attribute mapping.
Class Method Summary collapse
Class Attribute Details
.mapping ⇒ Object (readonly)
Returns the value of attribute mapping.
6 7 8 |
# File 'lib/uprb/require_tracker.rb', line 6 def mapping @mapping end |
Class Method Details
.record_require(name, features) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/uprb/require_tracker.rb', line 19 def record_require(name, features) return if !@mapping || @mapping[name] path = find_loaded_feature(name, features) @mapping[name] = path if path end |
.start ⇒ Object
8 9 10 11 |
# File 'lib/uprb/require_tracker.rb', line 8 def start install_require_hook @mapping = {} end |
.stop ⇒ Object
13 14 15 16 17 |
# File 'lib/uprb/require_tracker.rb', line 13 def stop recorded = @mapping @mapping = nil return recorded end |