Skip to content

Instantly share code, notes, and snippets.

@Keqi
Created July 29, 2021 15:42
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 Keqi/9d4a738f4c6a4883589c60b2173dbe6d to your computer and use it in GitHub Desktop.
Save Keqi/9d4a738f4c6a4883589c60b2173dbe6d to your computer and use it in GitHub Desktop.
class User
attr_reader :role
def initialize(role)
@role = role
end
def admin?
role == 'admin'
end
def marketer?
role == 'marketer'
end
def sales?
role == 'sales'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment