Skip to content

Instantly share code, notes, and snippets.

@jamesbebbington
Created October 8, 2009 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesbebbington/204882 to your computer and use it in GitHub Desktop.
Save jamesbebbington/204882 to your computer and use it in GitHub Desktop.
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