Skip to content

Instantly share code, notes, and snippets.

@briu
Last active October 12, 2020 12:45
Show Gist options
  • Save briu/00a6d6c0ca08ca917d7f466d35ecbd18 to your computer and use it in GitHub Desktop.
Save briu/00a6d6c0ca08ca917d7f466d35ecbd18 to your computer and use it in GitHub Desktop.
create two classes with same interfaces
# 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