Class: Dcr::Command::Left

Inherits:
Dcr::Command show all
Defined in:
app/models/dcr/command/left.rb

Instance Attribute Summary

Attributes inherited from Dcr::Command

#text

Instance Method Summary collapse

Methods inherited from Dcr::Command

command_alias, command_aliases, command_exclusion, command_exclusions, command_operation, create, #initialize, match?, #normalized_text, #operation, #operation=, operation_derivatives, #operation_options, parse_operation, parse_value, #parsed_operation, #parsed_value, #value=

Constructor Details

This class inherits a constructor from Dcr::Command

Instance Method Details

#callObject



28
29
30
# File 'app/models/dcr/command/left.rb', line 28

def call
  @program.angle -= value
end

#valueObject



32
33
34
# File 'app/models/dcr/command/left.rb', line 32

def value
  super.to_f == 0 ? 90.0 : super.to_f
end