Last active
August 29, 2015 14:22
-
-
Save rhyseda/814fa82549fd3732ed00 to your computer and use it in GitHub Desktop.
ARGV clear
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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