module Kernel - webby-0.9.4 Documentation

# module Kernel

### Public Instance Methods

cmd_available?( *args ) click to toggle source

    # File lib/webby/core_ext/kernel.rb, line 9
    def cmd_available?( *args )
      io = [STDOUT.dup, STDERR.dup]
      STDOUT.reopen DEV_NULL
      STDERR.reopen DEV_NULL
      system(*(args.flatten))
    ensure
      STDOUT.reopen io.first
      STDERR.reopen io.last
      $stdout, $stderr = STDOUT, STDERR
    end

journal() click to toggle source

    # File lib/webby/core_ext/kernel.rb, line 20
    def journal
      @journal ||= ::Webby::Journal.new
    end