class Kongfigure::CLI
Attributes
options[RW]
Public Class Methods
new()
click to toggle source
# File lib/kongfigure/cli.rb, line 7 def initialize @options = { debug: false } @option_parser = OptionParser.new do |parser| parser.on("-f", "--file FILE", "Path to the Kongfigure configuration file.") do |file| @options[:file] = file end parser.on("-u", "--url URL", "Url to the kong admin API.") do |url| @options[:url] = url end parser.on("-d", "--debug", "Debug mode.") do @options[:debug] = true end end end
Public Instance Methods
parse!(args)
click to toggle source
# File lib/kongfigure/cli.rb, line 24 def parse!(args) @option_parser.parse!(args) @options end