Sha256: 3ceb2f3ca56c4f5bcd98403fd781d381827d5b5b9622c29b021af4e9c84ae331

Contents?: true

Size: 450 Bytes

Versions: 47

Compression:

Stored size: 450 Bytes

Contents

module Ruboto
  module Util
    module LogAction
      ###########################################################################
      #
      # log_action: put text to stdout around the execution of a block
      #
      
      def log_action(initial_text, final_text="Done.", &block)
        $stdout.sync = true

        print initial_text, "..."
        result = yield
        puts final_text
        
        result
      end
    end
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
ruboto-0.13.0.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.12.0.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.11.0 lib/ruboto/util/log_action.rb
ruboto-0.11.0.rc.1 lib/ruboto/util/log_action.rb
ruboto-0.11.0.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.10.2 lib/ruboto/util/log_action.rb
ruboto-0.10.2.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.10.1 lib/ruboto/util/log_action.rb
ruboto-0.10.0 lib/ruboto/util/log_action.rb
ruboto-0.10.0.rc.1 lib/ruboto/util/log_action.rb
ruboto-0.10.0.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.9.0 lib/ruboto/util/log_action.rb
ruboto-0.9.0.rc.1 lib/ruboto/util/log_action.rb
ruboto-0.9.0.rc.0 lib/ruboto/util/log_action.rb
ruboto-0.8.1 lib/ruboto/util/log_action.rb
ruboto-0.8.0 lib/ruboto/util/log_action.rb
ruboto-0.7.0 lib/ruboto/util/log_action.rb
ruboto-0.6.0 lib/ruboto/util/log_action.rb
ruboto-0.5.4 lib/ruboto/util/log_action.rb
ruboto-0.5.3 lib/ruboto/util/log_action.rb