Created
October 8, 2009 09:26
-
-
Save jamesbebbington/204882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'roleful' | |
@klass = Class.new do | |
attr_reader :role | |
def initialize(*role) | |
@role = role.empty? ? :null : role | |
end | |
include Roleful | |
end | |
user = @klass.new(:debugulator) | |
user.debugulator? | |
@klass.role(:debugulator) | |
user = @klass.new(:debugulator) | |
user.debugulator? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment