Class: Stupidedi::Versions::Common::ElementTypes::StringVal::Valid
Instance Attribute Summary
#position, #usage
Instance Method Summary
collapse
wrappers
unary_operators
relational_operators
empty, #string?, #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)
230
231
232
233
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 230
def ==(other)
other = StringVal.value(other, usage, position)
other.valid? and other.value == value
end
|
#coerce(other)
243
244
245
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 243
def coerce(other)
return StringVal.value(other, usage, position), self
end
|
#copy(changes = {}) ⇒ StringVal
236
237
238
239
240
241
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 236
def copy(changes = {})
StringVal.value \
changes.fetch(:value, value),
changes.fetch(:usage, usage),
changes.fetch(:position, position)
end
|
252
253
254
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 252
def map
StringVal.value(yield(value), usage, position)
end
|
#valid? ⇒ Boolean
247
248
249
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 247
def valid?
true
end
|