Class: Eddy::Elements::E156
- Inherits:
-
Models::Element::ID
- Object
- Models::Element::Base
- Models::Element::ID
- Eddy::Elements::E156
- Defined in:
- lib/definitions/elements/manual/156.state_or_province_code.rb
Overview
Element Summary:
- Id: 156
- Name: State or Province Code
- Type: ID
- Min/Max: 2/2
- Description: Code (Standard State/Province) as defined by appropriate government agency.
Notes:
- FIXME: Currently only accepts states in the USA.
Instance Attribute Summary
Attributes inherited from Models::Element::Base
#description, #id, #max, #min, #name, #ref, #type
Instance Method Summary collapse
Methods inherited from Models::Element::ID
#process_value, process_value, #value, #value=
Methods inherited from Models::Element::Base
#doc_comment, #process_value, process_value, #req, #req=, #value, #value=
Constructor Details
#initialize(val: nil, req: nil, ref: nil) ⇒ void
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/definitions/elements/manual/156.state_or_province_code.rb', line 20 def initialize(val: nil, req: nil, ref: nil) @id = "156" @name = "State or Province Code" @description = "(Standard State/Province) as defined by appropriate government agency." super( min: 2, max: 2, req: req, ref: ref, val: val, ) end |
Instance Method Details
#code_list ⇒ Array<String>
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/definitions/elements/manual/156.state_or_province_code.rb', line 34 def code_list() return [ "AL", "AK", "AZ", "AR", "CA", "CO", "CT", "DE", "DC", "FL", "GA", "HI", "ID", "IL", "IN", "IA", "KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV", "NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD", "TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY", ] end |