Class: Class
- Inherits:
-
Object
- Object
- Class
- Defined in:
- lib/ext/class.rb
Overview
Special grably specific class extensions
Instance Method Summary collapse
-
#class_files ⇒ Object
Get all files included in current class.
- #inherited(cl) ⇒ Object
Instance Method Details
#class_files ⇒ Object
Get all files included in current class
12 13 14 |
# File 'lib/ext/class.rb', line 12 def class_files const_get(files_const_name) end |
#inherited(cl) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/ext/class.rb', line 3 def inherited(cl) # We need this, for code changes tracking. # For example, if job code changes, we need # rebuild it files = cl.const_defined?(files_const_name) ? cl.const_get(files_const_name) : [] cl.const_set(files_const_name, files + [normalize_caller(caller)]) end |