Last active
October 12, 2020 12:45
-
-
Save briu/00a6d6c0ca08ca917d7f466d35ecbd18 to your computer and use it in GitHub Desktop.
create two classes with same interfaces
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
# User attributes name surname | |
class User < ApplicationRecord | |
end | |
class Guest | |
def name | |
'test' | |
end | |
end | |
Guest.new.surname | |
=> nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment