samples/download_webpage.rb in args_parser-0.0.7 vs samples/download_webpage.rb in args_parser-0.0.8
- old
+ new
@@ -10,10 +10,10 @@
arg :output, 'output file', :alias => :o, :default => 'out.html'
arg :verbose, 'verbose mode'
arg :help, 'show help', :alias => :h
filter :url do |v|
- v.strip
+ v.to_s.strip
end
validate :url, "invalid URL" do |v|
v =~ /^https?:\/\/.+$/
end