Sha256: bd9ed5cbc2628996dbdeffce4aef0065c15d6edd2bd9e742c51577cce5b68e21

Contents?: true

Size: 576 Bytes

Versions: 9

Compression:

Stored size: 576 Bytes

Contents

require_all File.dirname(__FILE__) +'/user'

module Roles::Generic
  module User
    INHERITABLE_CLASS_ATTRIBUTES = [:roles_attribute_name, :valid_roles]

    include Implementation

    def self.included(base) # :nodoc:
      base.extend ClassMethods
      base.class_eval do       
        class << self   
          attr_accessor(*::Roles::Generic::User::INHERITABLE_CLASS_ATTRIBUTES)
          
          def apply_options options 
            roles_attribute default_role_attribute if options == :default
          end             
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
roles_generic-0.3.3 lib/roles_generic/generic/user.rb
roles_generic-0.2.7 lib/roles_generic/generic/user.rb
roles_generic-0.2.6 lib/roles_generic/generic/user.rb
roles_generic-0.2.5 lib/roles_generic/generic/user.rb
roles_generic-0.2.4 lib/roles_generic/generic/user.rb
roles_generic-0.2.3 lib/roles_generic/generic/user.rb
roles_generic-0.2.2 lib/roles_generic/generic/user.rb
roles_generic-0.2.1 lib/roles_generic/generic/user.rb
roles_generic-0.2.0 lib/roles_generic/generic/user.rb