Skip to content

Instantly share code, notes, and snippets.

@KeithYokoma
Forked from ainame/identity.rb
Last active September 17, 2015 13:33
Show Gist options
  • Save KeithYokoma/dc3207b32b11bd684a49 to your computer and use it in GitHub Desktop.
Save KeithYokoma/dc3207b32b11bd684a49 to your computer and use it in GitHub Desktop.
.idがidenitityを提供するということを示すmixinモジュールの名前どれが良いか
# 1
class Coriander
include MyApp::Entity::HasId
end
# 2
class Coriander
include MyApp::Entity::Identifiable
end
# 3
class Coriander
include MyApp::Entity::Equatable
end
# 4
class Coriander
include MyApp::Entity::Unique
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment