Sha256: 528679ec2a61083ae6787cc17f1649a357fcffe7d22484dbd2810c7573357589

Contents?: true

Size: 803 Bytes

Versions: 1

Compression:

Stored size: 803 Bytes

Contents

#!/usr/local/bin/ruby -w

# import.rb
#
#  Created by James Edward Gray II on 2005-04-26.
#  Copyright 2005 Gray Productions. All rights reserved.

require "highline"
require "forwardable"

$terminal = HighLine.new

#
# <tt>require "highline/import"</tt> adds shorcut methods to Kernel, making
# agree(), ask(), choose() and say() globally available.  This is handy for
# quick and dirty input and output.  These methods use the HighLine object in
# the global variable <tt>$terminal</tt>, which is initialized to used
# <tt>$stdin</tt> and <tt>$stdout</tt> (you are free to change this).
# Otherwise, these methods areidentical to their HighLine counterparts, see that
# class for detailed explinations.
#
module Kernel
  extend Forwardable
  def_delegators :$terminal, :agree, :ask, :choose, :say
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
highline-1.0.2 lib/highline/import.rb