Class: Datafile::Inline
- Inherits:
-
Object
- Object
- Datafile::Inline
- Includes:
- LogUtils::Logging
- Defined in:
- lib/datafile/datafile.rb
Overview
todo/check: use Script for Inline too?? - why, why not???
- use setup/pre/before and post/after or something??
- note: for now always is pre/before
Instance Method Summary collapse
- #call ⇒ Object
- #dump ⇒ Object
-
#initialize(proc) ⇒ Inline
constructor
A new instance of Inline.
Constructor Details
#initialize(proc) ⇒ Inline
Returns a new instance of Inline.
30 31 32 |
# File 'lib/datafile/datafile.rb', line 30 def initialize( proc ) @proc = proc end |
Instance Method Details
#call ⇒ Object
34 35 36 37 |
# File 'lib/datafile/datafile.rb', line 34 def call logger.info( "[inline] calling script block" ) @proc.call end |
#dump ⇒ Object
39 40 41 |
# File 'lib/datafile/datafile.rb', line 39 def dump puts " script: #{@proc.inspect}" end |