Sha256: 8a23d10609675db239cf5329668f7cde38e661c1d9d23229ff0e48284358302f
Contents?: true
Size: 555 Bytes
Versions: 33
Compression:
Stored size: 555 Bytes
Contents
module RolePermit class Base attr_accessor :ability def initialize(ability) @ability = ability end def permit?(user) puts "Base Permit" end end class Admin < Base def initialize(ability) super end def permit?(user) super puts "Admin" end end class Guest < Base def initialize(ability) super end def permit?(user) super puts "User" end end end RolePermit::Admin.new(0).permit? 0 RolePermit::Guest.new(0).permit? 0
Version data entries
33 entries across 33 versions & 1 rubygems