Module: Flippy

Includes:
Vertical
Defined in:
lib/flippy.rb,
lib/flippy/version.rb

Defined Under Namespace

Modules: Console, Vertical

Constant Summary collapse

T =
[[65, 5572], [66, 5626], [67, 390], [68, 5601], [69, 398], [70, 8498], [71, 8513], [72, 72], [73, 73], [74, 5259], [75, 20012], [76, 8514], [77, 87], [78, 78], [79, 79], [80, 1280], [81, 908], [82, 7450], [83, 83], [84, 8869], [85, 1352], [86, 923], [87, 77], [88, 88], [89, 8516], [90, 90], [97, 592], [98, 113], [99, 596], [100, 112], [101, 601], [102, 607], [103, 595], [104, 613], [105, 7433], [106, 638], [107, 670], [108, 108], [109, 623], [110, 117], [111, 111], [112, 100], [113, 98], [114, 633], [115, 115], [116, 647], [117, 110], [118, 652], [119, 653], [120, 120], [121, 654], [122, 122], [48, 48], [49, 8642], [50, 423], [51, 949], [52, 5421], [53, 53], [54, 57], [55, 76], [56, 56], [57, 54], [46, 729], [44, 8216], [45, 45], [58, 58], [59, 1563], [33, 161], [63, 191], [38, 8523], [40, 41], [41, 40], [60, 62], [62, 60], [91, 93], [93, 91], [95, 8254], [8254, 95], [123, 125], [125, 123], [8756, 8757], [8757, 8756]]
VERSION =
"0.1.3"

Constants included from Vertical

Vertical::HV, Vertical::PUNC, Vertical::SEPARATOR, Vertical::VH

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Vertical

#vertical

Class Method Details

.tableObject



18
19
20
21
22
23
# File 'lib/flippy.rb', line 18

def self.table
  T.map do |kv|
    kv.map { |code| "%s(U+%04x)" % [code.chr('UTF-8'), code]}
      .join(" => ")
  end
end

Instance Method Details

#flipObject



25
26
27
# File 'lib/flippy.rb', line 25

def flip
  flip_or_unflip { |chr| _flip chr }
end

#unflipObject



29
30
31
# File 'lib/flippy.rb', line 29

def unflip
  flip_or_unflip { |chr| _unflip chr }
end