class Hex1
Attributes
hex[R]
Public Class Methods
new(hex)
click to toggle source
# File lib/iching.rb, line 23 def initialize(hex) @hex = hex end
Public Instance Methods
bin_hex_key()
click to toggle source
# File lib/iching.rb, line 27 def bin_hex_key { 6 => '0', 7 => '1', 8 => '0', 9 => '1'} end
hex_name()
click to toggle source
# File lib/iching.rb, line 39 def hex_name hex_binary = hex.map{|n| bin_hex_key[n]}.join("").reverse() return list[hex_binary] end
hex_symbol()
click to toggle source
# File lib/iching.rb, line 35 def hex_symbol hex.map{|n| hexagram_key[n] }.join("\n") end
hexagram_key()
click to toggle source
# File lib/iching.rb, line 31 def hexagram_key { 6 => '-- --', 7 => '-----', 8 => '-- --', 9 => '-----'} end