class DYI::Shape::Path::VerticalLineCommand
Public Class Methods
new(relative, preceding_command, y)
click to toggle source
Calls superclass method
DYI::Shape::Path::LineCommand::new
# File lib/dyi/shape/path.rb, line 774 def initialize(relative, preceding_command, y) super(relative, preceding_command, Coordinate.new(relative ? 0 : preceding_command.last_point.x, y)) end
Public Instance Methods
instructions_char()
click to toggle source
# File lib/dyi/shape/path.rb, line 786 def instructions_char relative? ? 'v' : 'V' end
to_compatible_commands(preceding_command)
click to toggle source
# File lib/dyi/shape/path.rb, line 778 def to_compatible_commands(preceding_command) LineCommand.new(relative?, preceding_command, @point) end
to_concise_syntax_fragments()
click to toggle source
# File lib/dyi/shape/path.rb, line 782 def to_concise_syntax_fragments used_same_command? ? @point.y.to_s : (instructions_char + @point.y.to_s) end