class Roby::Interface::Async::UIConnector::SetArgumentCommand
Attributes
argument_name[R]
Public Class Methods
new(connector, action, argument_name, getter: nil)
click to toggle source
Calls superclass method
# File lib/roby/interface/async/ui_connector.rb, line 70 def initialize(connector, action, argument_name, getter: nil) super(connector, action, getter: nil) @argument_name = argument_name.to_sym end
Public Instance Methods
run(arg)
click to toggle source
# File lib/roby/interface/async/ui_connector.rb, line 75 def run(arg) if getter = options[:getter] arg = getter.call(arg) if !arg Interface.warn "not setting argument #{action}.#{argument_name}: getter returned nil" return end end action.arguments[argument_name] = arg if options[:auto_apply] StartAction.new(connector, action, restart: true).run end end