amiel/bitmasker — pull request #6 by hassox (2014-11-18 22:48:53+00:00)
Title: Adds accessor method prefixes

- Adds prefix methods for model accessors
- Implements array setters
- Implements << setters

class MyModel
extend Bitmasker::Model

has_bitmask_attributes :roles, 'has_role_' do |config|
config.attribute :admin, 1 << 0
config.attribute :manager, 1 << 1
end
end

my_model.roles << :admin
my_model.roles = [:admin, :manager]

my_model.has_role_admin? # true