Class: DYI::Shape::Path::CloseCommand
Overview
Instance Attribute Summary
Attributes inherited from CommandBase
#point, #preceding_command
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from CommandBase
absolute_commands, #preceding_point, relative_commands, #start_point, #to_compatible_commands, #used_same_command?
Constructor Details
#initialize(preceding_command) ⇒ CloseCommand
Returns a new instance of CloseCommand.
695
696
697
698
699
700
|
# File 'lib/dyi/shape/path.rb', line 695
def initialize(preceding_command)
raise ArgumentError, 'preceding_command is nil' if preceding_command.nil?
@relative = nil
@preceding_command = preceding_command
@point = nil
end
|
Class Method Details
.commands(preceding_command) ⇒ Object
725
726
727
|
# File 'lib/dyi/shape/path.rb', line 725
def commands(preceding_command)
[new(preceding_command)]
end
|
Instance Method Details
#absolute? ⇒ Boolean
710
711
712
|
# File 'lib/dyi/shape/path.rb', line 710
def absolute?
nil
end
|
#instructions_char ⇒ Object
718
719
720
|
# File 'lib/dyi/shape/path.rb', line 718
def instructions_char
'Z'
end
|
#last_point ⇒ Object
702
703
704
|
# File 'lib/dyi/shape/path.rb', line 702
def last_point
start_point
end
|
#relative? ⇒ Boolean
706
707
708
|
# File 'lib/dyi/shape/path.rb', line 706
def relative?
nil
end
|
#to_concise_syntax_fragments ⇒ Object
714
715
716
|
# File 'lib/dyi/shape/path.rb', line 714
def to_concise_syntax_fragments
instructions_char
end
|