P
Peter Alvin
In irb I did:
puts 1 & 1
and get 1
shouldn't I get true?
Bottom line is this: What is Ruby idiom to test for bit mask? Is there
a more simple way to write:
if session[ermissions] & Permissions::SomeMask ==
Permissions::SomeMask
# user has permission to wash clothes, etc.
end
TIA,
Pete
puts 1 & 1
and get 1
shouldn't I get true?
Bottom line is this: What is Ruby idiom to test for bit mask? Is there
a more simple way to write:
if session[ermissions] & Permissions::SomeMask ==
Permissions::SomeMask
# user has permission to wash clothes, etc.
end
TIA,
Pete