BitOptions
class BitOptions
attr_accessor :options, :raw
def initialize *options
@options = options
end
def parse raw
ret = {}
@options.each_with_index do |k, i|
ret[k] = !!raw[i].nonzero?
end
ret
end
end
bo = BitOptions.new *%i( a b )
pp bo.parse 2
INFO