Class: WCC::Data::Nucleus::MaritalStatus
- Inherits:
-
EnumeratedType
- Object
- EnumeratedType
- WCC::Data::Nucleus::MaritalStatus
- Defined in:
- lib/wcc/data/nucleus/marital_status.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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/wcc/data/nucleus/marital_status.rb', line 10 def self.db [ { id: 1, name: 'Single', key: :single, }, { id: 2, name: 'Married', key: :married, }, { id: 3, name: 'Widowed', key: :widowed, }, { id: 4, name: 'Divorced', key: :divorced, }, { id: 5, name: 'Separated', key: :separated, }, ] end |
Instance Method Details
#matches?(value) ⇒ Boolean
6 7 8 |
# File 'lib/wcc/data/nucleus/marital_status.rb', line 6 def matches?(value) [id, key].include?(value) end |