Class: ToSource::Command::Shift
- Inherits:
-
ToSource::Command
- Object
- ToSource::Command
- ToSource::Command::Shift
- Defined in:
- lib/to_source/command.rb
Overview
Command that does a shift
Constant Summary
Constants inherited from ToSource::Command
Instance Attribute Summary collapse
-
#width ⇒ Fixnum
readonly
private
Return shift width.
Instance Method Summary collapse
-
#run(state) ⇒ self
private
Run command.
Instance Attribute Details
#width ⇒ Fixnum (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return shift width
72 73 74 |
# File 'lib/to_source/command.rb', line 72 def width @width end |
Instance Method Details
#run(state) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Run command
82 83 84 85 |
# File 'lib/to_source/command.rb', line 82 def run(state) state.shift(width) self end |