Ruby 1.8.7 リファレンスマニュアル > ライブラリ一覧 > shellライブラリ > Shellクラス > new

singleton method Shell.new

new -> Shell

プロセスのカレントディレクトリをカレントディレクトリとするShellオ ブジェクトを生成します.

使用例:カレントディレクトリを表示

sh = Shell.new
puts sh.pwd.to_s
class Shell