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
106 107 108 |
# File 'lib/rqrcode/export/svg.rb', line 106 def direction @direction end |
#start_x ⇒ Object
Returns the value of attribute start_x
106 107 108 |
# File 'lib/rqrcode/export/svg.rb', line 106 def start_x @start_x end |
#start_y ⇒ Object
Returns the value of attribute start_y
106 107 108 |
# File 'lib/rqrcode/export/svg.rb', line 106 def start_y @start_y end |
Instance Method Details
#end_x ⇒ Object
107 108 109 110 111 112 113 |
# File 'lib/rqrcode/export/svg.rb', line 107 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
115 116 117 118 119 120 121 |
# File 'lib/rqrcode/export/svg.rb', line 115 def end_y case direction when :down then start_y + 1 when :up then start_y - 1 else start_y end end |