Created
January 6, 2022 10:24
-
-
Save Keqi/5728f6c37db19b2af8373d02fb3daa51 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
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