Class: RQRCode::Export::SVG::Edge
- Inherits:
-
Struct
- Object
- Struct
- RQRCode::Export::SVG::Edge
- Defined in:
- lib/rqrcode/export/svg.rb
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#start_x ⇒ Object
Returns the value of attribute start_x.
-
#start_y ⇒ Object
Returns the value of attribute start_y.
Instance Method Summary collapse
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction
100 101 102 |
# File 'lib/rqrcode/export/svg.rb', line 100 def direction @direction end |
#start_x ⇒ Object
Returns the value of attribute start_x
100 101 102 |
# File 'lib/rqrcode/export/svg.rb', line 100 def start_x @start_x end |
#start_y ⇒ Object
Returns the value of attribute start_y
100 101 102 |
# File 'lib/rqrcode/export/svg.rb', line 100 def start_y @start_y end |
Instance Method Details
#end_x ⇒ Object
101 102 103 104 105 106 107 |
# File 'lib/rqrcode/export/svg.rb', line 101 def end_x case direction when :right then start_x + 1 when :left then start_x - 1 else start_x end end |
#end_y ⇒ Object
109 110 111 112 113 114 115 |
# File 'lib/rqrcode/export/svg.rb', line 109 def end_y case direction when :down then start_y + 1 when :up then start_y - 1 else start_y end end |