APIdock / Ruby
/
method

environment

ruby latest stable - Class: OptionParser
environment(env = File.basename(0,ドル '.*'))
public

Parses environment variable env or its uppercase with splitting like a shell.

env defaults to the basename of the program.

# File lib/optparse.rb, line 1801
 def environment(env = File.basename(0,ドル '.*'))
 env = ENV[env] || ENV[env.upcase] or return
 require 'shellwords'
 parse(*Shellwords.shellwords(env))
 end

AltStyle によって変換されたページ (->オリジナル) /