Module: Roaring::BitmapCommon::ClassMethods

Included in:
Roaring::Bitmap32, Roaring::Bitmap64
Defined in:
lib/roaring.rb

Instance Method Summary collapse

Instance Method Details

#[](*args) ⇒ Object

Convenience method for building a bitmap



72
73
74
75
76
77
78
79
80
# File 'lib/roaring.rb', line 72

def [](*args)
  if args.size == 0
    new
  elsif args.size == 1 && !(Integer === args[0])
    new(args[0])
  else
    new(args)
  end
end

#_load(args) ⇒ Object



82
83
84
# File 'lib/roaring.rb', line 82

def _load args
  deserialize(args)
end