Class: Datafile::Inline

Inherits:
Object
  • Object
show all
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

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

#callObject



34
35
36
37
# File 'lib/datafile/datafile.rb', line 34

def call
  logger.info( "[inline] calling script block" )
  @proc.call
end

#dumpObject



39
40
41
# File 'lib/datafile/datafile.rb', line 39

def dump
  puts "  script: #{@proc.inspect}"
end