Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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