bin/code in code-ruby-0.6.3 vs bin/code in code-ruby-0.6.4
- old
+ new
@@ -1,17 +1,18 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
require "optparse"
require_relative "../lib/code-ruby"
options = { timeout: 0, profile: false, profiler: "text" }
OptionParser
.new do |opts|
opts.banner = "Usage: template [options]"
- opts.on("-v", "--version", "Version of template") do |input|
+ opts.on("-v", "--version", "Version of template") do |_input|
puts Code::Version
exit
end
opts.on(
@@ -42,10 +43,10 @@
"-t TIMEOUT",
"--timeout=TIMEOUT",
"Set timeout in seconds"
) { |timeout| options[:timeout] = timeout.to_f }
- opts.on("--profile", "Profile Ruby code") do |timeout|
+ opts.on("--profile", "Profile Ruby code") do |_timeout|
require "ruby-prof"
options[:profile] = true
end
opts.on(