Sha256: 3809b6305b5012fe9aeb7de24c33baf47b9ff2833b41c11708105bf955de9431

Contents?: true

Size: 362 Bytes

Versions: 7

Compression:

Stored size: 362 Bytes

Contents

module Roles::Generic::Role
  module InstanceMethods
    def role_class
      self.class.role_class_name
    end      
  end

  module ClassMethods 
    def role_class_name
      @role_class_name          
    end

    def role_class class_constant
      const = class_constant.to_s.camelize
      @role_class_name = "#{const}".constantize
    end
  end    
end

Version data entries

7 entries across 7 versions & 1 rubygems

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