Class: WCC::Data::Nucleus::Gender
- Inherits:
-
EnumeratedType
- Object
- EnumeratedType
- WCC::Data::Nucleus::Gender
- Defined in:
- lib/wcc/data/nucleus/gender.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from EnumeratedType
[], all, #initialize, reset
Constructor Details
This class inherits a constructor from WCC::Data::EnumeratedType
Class Method Details
.db ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/wcc/data/nucleus/gender.rb', line 10 def self.db [ { id: 1, name: 'Male', key: :male, }, { id: 2, name: 'Female', key: :female, }, ] end |
Instance Method Details
#matches?(value) ⇒ Boolean
6 7 8 |
# File 'lib/wcc/data/nucleus/gender.rb', line 6 def matches?(value) [id, key].include?(value) end |