Class: Stupidedi::Versions::Common::ElementTypes::IdentifierVal::Valid
Instance Attribute Summary
#position, #usage
Instance Method Summary
collapse
wrappers
unary_operators
relational_operators
empty, #id?, #too_long?, #too_short?, value
#allowed?, #component?, #date?, #id?, #initialize, #leaf?, #numeric?, #simple?, #string?, #time?, #to_s, #to_x12, #too_long?, #too_short?
#element?, #size
#blank?, #characters, #component?, #composite?, #definition, #descriptor, #element?, #empty?, #functional_group?, #interchange?, #invalid?, #leaf?, #loop?, #present?, #repeated?, #segment?, #separator?, #simple?, #size, #table?, #transaction_set?, #transmission?
Methods included from Color
ansi, #ansi
Methods included from Inspect
#inspect
Instance Method Details
#==(other)
156
157
158
159
|
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 156
def ==(other)
other = IdentifierVal.value(other, usage, position)
other.valid? and other.value == value
end
|
#coerce(other)
169
170
171
|
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 169
def coerce(other)
return IdentifierVal.value(other, usage, position), self
end
|
#copy(changes = {}) ⇒ StringVal
162
163
164
165
166
167
|
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 162
def copy(changes = {})
IdentifierVal.value \
changes.fetch(:value, value),
changes.fetch(:usage, usage),
changes.fetch(:position, position)
end
|
174
175
176
|
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 174
def map
IdentifierVal.value(yield(value), usage, position)
end
|
#valid? ⇒ Boolean
178
179
180
|
# File 'lib/stupidedi/versions/common/element_types/id.rb', line 178
def valid?
true
end
|