Class: Diagrams::Arrow
- Defined in:
- lib/maruku/ext/diagrams/inspect.rb,
lib/maruku/ext/diagrams/structures.rb
Instance Attribute Summary collapse
-
#cap1 ⇒ Object
either nil or the cap.
-
#cap2 ⇒ Object
either nil or the cap.
-
#end_link ⇒ Object
Returns the value of attribute end_link.
-
#end_pos ⇒ Object
Returns the value of attribute end_pos.
-
#length ⇒ Object
Returns the value of attribute length.
-
#object_end ⇒ Object
Returns the value of attribute object_end.
-
#object_start ⇒ Object
Returns the value of attribute object_start.
-
#start_link ⇒ Object
Returns the value of attribute start_link.
-
#start_pos ⇒ Object
Returns the value of attribute start_pos.
-
#type ⇒ Object
:S, :NW, :SE, :E.
-
#v_end ⇒ Object
variables for start and end.
-
#v_start ⇒ Object
variables for start and end.
Attributes inherited from Sized
Instance Method Summary collapse
Methods inherited from Sized
Constructor Details
This class inherits a constructor from Diagrams::Sized
Instance Attribute Details
#cap1 ⇒ Object
either nil or the cap
69 70 71 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 69 def cap1 @cap1 end |
#cap2 ⇒ Object
either nil or the cap
69 70 71 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 69 def cap2 @cap2 end |
#end_link ⇒ Object
Returns the value of attribute end_link.
71 72 73 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 71 def end_link @end_link end |
#end_pos ⇒ Object
Returns the value of attribute end_pos.
70 71 72 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 70 def end_pos @end_pos end |
#length ⇒ Object
Returns the value of attribute length.
72 73 74 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 72 def length @length end |
#object_end ⇒ Object
Returns the value of attribute object_end.
73 74 75 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 73 def object_end @object_end end |
#object_start ⇒ Object
Returns the value of attribute object_start.
73 74 75 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 73 def object_start @object_start end |
#start_link ⇒ Object
Returns the value of attribute start_link.
71 72 73 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 71 def start_link @start_link end |
#start_pos ⇒ Object
Returns the value of attribute start_pos.
70 71 72 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 70 def start_pos @start_pos end |
#type ⇒ Object
:S, :NW, :SE, :E
68 69 70 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 68 def type @type end |
#v_end ⇒ Object
variables for start and end
77 78 79 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 77 def v_end @v_end end |
#v_start ⇒ Object
variables for start and end
77 78 79 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 77 def v_start @v_start end |
Instance Method Details
#inspect ⇒ Object
4 5 6 7 8 |
# File 'lib/maruku/ext/diagrams/inspect.rb', line 4 def inspect "Arrow (#{(@cap1||?-).chr},#{(@cap2||?-).chr}) "+ "from #{@start_link.class} to #{@end_link.class} "+ " #{@start_pos.inspect} -> #{@end_pos.inspect}" end |
#is_vert? ⇒ Boolean
79 80 81 |
# File 'lib/maruku/ext/diagrams/structures.rb', line 79 def is_vert? start_pos.x == end_pos.x end |