Class: Flowckerc::Formula
- Inherits:
-
Object
- Object
- Flowckerc::Formula
- Defined in:
- lib/flowckerc/formula.rb
Constant Summary collapse
- @@trail =
Hike::Trail.new "/"
Instance Method Summary collapse
- #eval(context) ⇒ Object
-
#initialize(orig_file) ⇒ Formula
constructor
A new instance of Formula.
Constructor Details
#initialize(orig_file) ⇒ Formula
Returns a new instance of Formula.
24 25 26 27 |
# File 'lib/flowckerc/formula.rb', line 24 def initialize orig_file @file = @@trail.find orig_file raise 'Cannot find formula '+ orig_file if @file.nil? end |
Instance Method Details
#eval(context) ⇒ Object
29 30 31 |
# File 'lib/flowckerc/formula.rb', line 29 def eval context context.instance_eval File.read(@file), @file end |