Module: Forever
- Extended by:
- Forever
- Included in:
- Forever
- Defined in:
- lib/forever.rb,
lib/forever/job.rb,
lib/forever/base.rb,
lib/forever/version.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.3.3"
Instance Method Summary collapse
Instance Method Details
#run(options = {}, &block) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/forever.rb', line 14 def run(={}, &block) caller_file = caller(1).map { |line| line.split(/:(?=\d|in )/)[0,1] }.flatten.first [:file] ||= File.(caller_file) [:dir] ||= File.('../../', [:file]) # => we presume we are calling it from a bin|script dir Base.new(, &block) end |