Class: UpAndRunning::Compiler
- Inherits:
-
Object
- Object
- UpAndRunning::Compiler
- Defined in:
- lib/up_and_running/compiler.rb
Class Method Summary collapse
Instance Method Summary collapse
- #after_compile ⇒ Object
- #before_compile ⇒ Object
- #compile ⇒ Object
-
#initialize(scope, out) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(scope, out) ⇒ Compiler
Returns a new instance of Compiler.
18 19 20 21 |
# File 'lib/up_and_running/compiler.rb', line 18 def initialize(scope, out) @scope = scope @out = out end |
Class Method Details
.inherited(subclass) ⇒ Object
6 7 8 9 |
# File 'lib/up_and_running/compiler.rb', line 6 def inherited(subclass) @path_of ||= {} @path_of[subclass] = caller.first.sub(/:.*/, '') end |
.path_of(klass) ⇒ Object
11 12 13 |
# File 'lib/up_and_running/compiler.rb', line 11 def path_of(klass) @path_of[klass] end |
Instance Method Details
#after_compile ⇒ Object
30 |
# File 'lib/up_and_running/compiler.rb', line 30 def after_compile; end |
#before_compile ⇒ Object
23 |
# File 'lib/up_and_running/compiler.rb', line 23 def before_compile; end |
#compile ⇒ Object
25 26 27 28 |
# File 'lib/up_and_running/compiler.rb', line 25 def compile copy_dir if dir compile_erb(@scope) if compile_erb? end |