class Ark::CLI::Report
Stores information parsed from the command line for later inspection
Public Class Methods
new(args, named, trailing, options, counts)
click to toggle source
Initialize a bare Report
object
# File lib/ark/cli/report.rb, line 7 def initialize(args, named, trailing, options, counts) @args = args @named = named @trailing = trailing @options = options @counts = counts end
Public Instance Methods
arg(name)
click to toggle source
Get an argument by name
# File lib/ark/cli/report.rb, line 21 def arg(name) return @named[name.to_s] end
args()
click to toggle source
Return an array of all args parsed
# File lib/ark/cli/report.rb, line 16 def args return @args end
count(name)
click to toggle source
Get the toggle count for an option by name
# File lib/ark/cli/report.rb, line 41 def count(name) return @counts[name.to_s] end
opt(name)
click to toggle source
Get the value of an option by name
# File lib/ark/cli/report.rb, line 36 def opt(name) return @options[name.to_s] end
opts()
click to toggle source
Get a hash of all options and their values
# File lib/ark/cli/report.rb, line 31 def opts return @options end
trailing()
click to toggle source
Return an array of any arguments without names
# File lib/ark/cli/report.rb, line 26 def trailing return @trailing end