Sha256: f3272ab0afcb089f091fe55733bbf7802f5eb0a6453fb80cea78b11c45737765
Contents?: true
Size: 352 Bytes
Versions: 2
Compression:
Stored size: 352 Bytes
Contents
# A no operation command that's returned to avoid nil exceptions when the command the user # enters is invalid. The idea is based on the null pointer design pattern module Robot module Commands class NoOp < Base def self.matches?(command) true end def self.call(position) position end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
robot_rea-0.1.5 | lib/robot/commands/no_op.rb |
robot_rea-0.1.4 | lib/robot/commands/no_op.rb |