class Ragel::Bitmap::ArrayGeneric

Public Class Methods

new(*strings) click to toggle source
# File lib/ragel/bitmap.rb, line 52
def initialize(*strings)
  @strings = strings
end

Public Instance Methods

[](idx) click to toggle source
# File lib/ragel/bitmap.rb, line 56
def [](idx)
  shift = @strings.length * 8
  @strings.inject(0) do |product, bitmap|
    shift -= 8
    product | (bitmap.getbyte(idx) << shift)
  end
end