Class: Ragel::Bitmap::Array32

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

Instance Method Summary collapse

Constructor Details

#initialize(first, second, third, fourth) ⇒ Array32

Returns a new instance of Array32.



52
53
54
55
56
57
# File 'lib/ragel/bitmap.rb', line 52

def initialize(first, second, third, fourth)
  @first = first
  @second = second
  @third = third
  @fourth = fourth
end

Instance Method Details

#[](idx) ⇒ Object



59
60
61
62
63
64
# File 'lib/ragel/bitmap.rb', line 59

def [](idx)
  (@first.getbyte(idx) << 24) |
    (@second.getbyte(idx) << 16) |
    (@third.getbyte(idx) << 8) |
    @fourth.getbyte(idx)
end