Skip to content

Instantly share code, notes, and snippets.

@rhyseda
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rhyseda/814fa82549fd3732ed00 to your computer and use it in GitHub Desktop.
Save rhyseda/814fa82549fd3732ed00 to your computer and use it in GitHub Desktop.
ARGV clear
class MyTest
attr_reader :cl_arguments
def initialize
@cl_arguments = ARGV.clone
end
def display
puts "Displaying the ARGV array"
puts ARGV
end
def argv_clear
ARGV.clear
end
def display_cl_options
puts "Displaying the command line arguments"
puts cl_arguments
end
end
testy = MyTest.new
testy.display_cl_options
testy.display
testy.argv_clear
testy.display
testy.display_cl_options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment