class Front::CLI::Controller
Attributes
options[R]
Public Class Methods
new(options)
click to toggle source
# File lib/front/cli/controller.rb, line 12 def initialize(options) @options = options @pool = VagrantPool.new(options.pool_size) end
Public Instance Methods
create()
click to toggle source
actions
# File lib/front/cli/controller.rb, line 18 def create @pool.create @pool.load end
destroy()
click to toggle source
# File lib/front/cli/controller.rb, line 23 def destroy @pool.unload end
inventory()
click to toggle source
# File lib/front/cli/controller.rb, line 39 def inventory puts File.read(@pool.get_inventory_file()) end
method_missing(method)
click to toggle source
# File lib/front/cli/controller.rb, line 67 def method_missing(method) show_error "Unknown action: #{method}" end
next()
click to toggle source
# File lib/front/cli/controller.rb, line 27 def next @pool.next end
show_error(msg = @options.error)
click to toggle source
# File lib/front/cli/controller.rb, line 60 def show_error(msg = @options.error) puts "Error: #{msg}" puts show_help end
show_help()
click to toggle source
help
# File lib/front/cli/controller.rb, line 72 def show_help puts @options.opts end
show_invalid_option()
click to toggle source
errors
# File lib/front/cli/controller.rb, line 48 def show_invalid_option show_error @options.error end
show_missing_args()
click to toggle source
# File lib/front/cli/controller.rb, line 52 def show_missing_args show_error @options.error end
show_parser_error()
click to toggle source
# File lib/front/cli/controller.rb, line 56 def show_parser_error show_error @options.error end
show_version()
click to toggle source
# File lib/front/cli/controller.rb, line 76 def show_version puts VERSION end
ssh()
click to toggle source
# File lib/front/cli/controller.rb, line 31 def ssh @pool.ssh end
ssh_config()
click to toggle source
# File lib/front/cli/controller.rb, line 35 def ssh_config puts @pool.ssh_config end
status()
click to toggle source
# File lib/front/cli/controller.rb, line 43 def status @pool.status end