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
116 117 118 |
# File 'lib/rqrcode/export/svg.rb', line 116 def direction @direction end |
#start_x ⇒ Object
Returns the value of attribute start_x
116 117 118 |
# File 'lib/rqrcode/export/svg.rb', line 116 def start_x @start_x end |
#start_y ⇒ Object
Returns the value of attribute start_y
116 117 118 |
# File 'lib/rqrcode/export/svg.rb', line 116 def start_y @start_y end |
Instance Method Details
#end_x ⇒ Object
117 118 119 120 121 122 123 |
# File 'lib/rqrcode/export/svg.rb', line 117 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
125 126 127 128 129 130 131 |
# File 'lib/rqrcode/export/svg.rb', line 125 def end_y case direction when :down then start_y + 1 when :up then start_y - 1 else start_y end end |