class Eddy::Elements::E156
### 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 and Canada.
Public Class Methods
new(val: nil, req: nil, ref: nil)
click to toggle source
@param val [String] (nil) @param req [String] (nil) @param ref [String] (nil) @return [void]
Calls superclass method
Eddy::Models::Element::ID::new
# 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
Public Instance Methods
code_list()
click to toggle source
@return [Array<String>]
# File lib/definitions/elements/manual/156.state_or_province_code.rb, line 34 def code_list() return [ # United States "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", # Canada "AB", "BC", "MB", "NB", "NL", "NS", "NT", "NU", "ON", "PE", "QC", "SK", "YT", ] end