Class: Datafile::Script
- Inherits:
-
Object
- Object
- Datafile::Script
- Includes:
- LogUtils::Logging
- Defined in:
- lib/datafile/datafile.rb
Instance Method Summary collapse
- #call ⇒ Object
- #dump ⇒ Object
-
#initialize(proc) ⇒ Script
constructor
A new instance of Script.
Constructor Details
#initialize(proc) ⇒ Script
Returns a new instance of Script.
8 9 10 |
# File 'lib/datafile/datafile.rb', line 8 def initialize( proc ) @proc = proc end |
Instance Method Details
#call ⇒ Object
12 13 14 15 |
# File 'lib/datafile/datafile.rb', line 12 def call logger.info( "[script] calling calc block" ) @proc.call end |
#dump ⇒ Object
17 18 19 |
# File 'lib/datafile/datafile.rb', line 17 def dump puts " script: #{@proc.inspect}" end |