Class: Nexter::Compass
- Inherits:
-
Object
- Object
- Nexter::Compass
- Defined in:
- lib/nexter/compass.rb
Constant Summary collapse
- DIREC =
{asc: 1, desc: -1}
- GOTO =
{next: 1, previous: -1}
Instance Attribute Summary collapse
-
#direction ⇒ Object
Returns the value of attribute direction.
-
#goto ⇒ Object
Returns the value of attribute goto.
Instance Method Summary collapse
- #bracket ⇒ Object
-
#initialize(goto) ⇒ Compass
constructor
A new instance of Compass.
- #redirection ⇒ Object
- #sign ⇒ Object
Constructor Details
#initialize(goto) ⇒ Compass
Returns a new instance of Compass.
12 13 14 |
# File 'lib/nexter/compass.rb', line 12 def initialize(goto) @goto = goto end |
Instance Attribute Details
#direction ⇒ Object
Returns the value of attribute direction.
7 8 9 |
# File 'lib/nexter/compass.rb', line 7 def direction @direction end |
#goto ⇒ Object
Returns the value of attribute goto.
7 8 9 |
# File 'lib/nexter/compass.rb', line 7 def goto @goto end |
Instance Method Details
#bracket ⇒ Object
16 17 18 |
# File 'lib/nexter/compass.rb', line 16 def bracket sign == -1 ? '<' : '>' end |
#redirection ⇒ Object
20 21 22 |
# File 'lib/nexter/compass.rb', line 20 def redirection sign == -1 ? 'DESC' : 'ASC' end |