class Kontena::Callbacks::DefaultMasterVersion
Public Instance Methods
after_load()
click to toggle source
# File lib/kontena/callbacks/master/deploy/04_default_master_version.rb, line 7 def after_load # Only run this for prerelease cli return unless Kontena::Cli::VERSION =~ /\d\.(?:pre|rc|beta|edge)/ version_switch = command.recognised_options.find {|opt| opt.switches.include?('--version')} if version_switch version_switch.instance_variable_set(:@default_value, 'edge') end end