Class: Ragel::Bitmap::Array16

Inherits:
Object
  • Object
show all
Defined in:
lib/ragel/bitmap.rb

Instance Method Summary collapse

Constructor Details

#initialize(highstring, lowstring) ⇒ Array16

Returns a new instance of Array16.



27
28
29
30
# File 'lib/ragel/bitmap.rb', line 27

def initialize(highstring, lowstring)
  @highstring = highstring
  @lowstring = lowstring
end

Instance Method Details

#[](idx) ⇒ Object



32
33
34
# File 'lib/ragel/bitmap.rb', line 32

def [](idx)
  (@highstring.getbyte(idx) << 8) | @lowstring.getbyte(idx)
end