class Nexter::Compass

Constants

DIREC
GOTO

Attributes

direction[RW]
goto[RW]

Public Class Methods

new(goto) click to toggle source
# File lib/nexter/compass.rb, line 12
def initialize(goto)
  @goto = goto
end

Public Instance Methods

bracket() click to toggle source
# File lib/nexter/compass.rb, line 16
def bracket
  sign == -1 ? '<' : '>'
end
redirection() click to toggle source
# File lib/nexter/compass.rb, line 20
def redirection
  sign == -1 ? 'DESC' : 'ASC'
end
sign() click to toggle source
# File lib/nexter/compass.rb, line 24
def sign
  DIREC[direction.downcase.to_sym] * GOTO[goto]
end