lib/rubysmith/cli/parsers/build.rb in rubysmith-0.4.0 vs lib/rubysmith/cli/parsers/build.rb in rubysmith-0.5.0
- old
+ new
@@ -2,10 +2,11 @@
module Rubysmith
module CLI
module Parsers
# Handles parsing of Command Line Interface (CLI) build options.
+ # :reek:TooManyMethods
class Build
def self.call client:, options:
new(client: client, options: options).call
end
@@ -14,11 +15,11 @@
@options = options
end
def call arguments = []
client.separator "\nBUILD OPTIONS:\n"
- private_methods.grep(/add_/).each(&method(:__send__))
+ private_methods.grep(/add_/).each { |method| __send__ method }
arguments.empty? ? arguments : client.parse!(arguments)
end
private
@@ -31,9 +32,15 @@
end
def add_bundler_audit
client.on "--[no-]bundler-audit", "Add Bundler Audit." do |value|
options[:build_bundler_audit] = value
+ end
+ end
+
+ def add_bundler_leak
+ client.on "--[no-]bundler-leak", "Add Bundler Leak." do |value|
+ options[:build_bundler_leak] = value
end
end
def add_console
client.on "--[no-]console", "Add console script." do |value|