Sha256: 705ac9f1efafb6d0ce2d5adfc7d7a14207171583edb3927266ea5320e5f62f8b
Contents?: true
Size: 608 Bytes
Versions: 4
Compression:
Stored size: 608 Bytes
Contents
module Imb class BarPosition def initialize(descender_character_position, ascender_character_position) @descender_character_position = descender_character_position @ascender_character_position = ascender_character_position end def map(characters) 2 * ascender_bit(characters) + descender_bit(characters) end private def descender_bit(characters) @descender_character_position.extract_bit_from_characters(characters) end def ascender_bit(characters) @ascender_character_position.extract_bit_from_characters(characters) end end end
Version data entries
4 entries across 4 versions & 1 rubygems