Class: Class

Inherits:
Object
  • Object
show all
Defined in:
lib/ext/class.rb

Overview

Special grably specific class extensions

Instance Method Summary collapse

Instance Method Details

#class_filesObject

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