class Command
Attributes
params[RW]
target[RW]
Public Class Methods
new(target: nil, params: nil)
click to toggle source
# File lib/another_toy_robot/command.rb, line 4 def initialize(target: nil, params: nil) @target = target @params = params post_initialize end
Public Instance Methods
execute()
click to toggle source
# File lib/another_toy_robot/command.rb, line 13 def execute return InvalidCommand.new.execute unless valid? issue_command end
post_initialize()
click to toggle source
# File lib/another_toy_robot/command.rb, line 11 def post_initialize; end
valid?()
click to toggle source
# File lib/another_toy_robot/command.rb, line 18 def valid? true end