Class: Stupidedi::Versions::Common::ElementTypes::TimeVal::Valid
Instance Attribute Summary
#position, #usage
Instance Method Summary
collapse
empty, #time?, #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) ⇒ Boolean
127
128
129
130
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 127
def ==(other)
other = TimeVal.value(other, usage, position)
other.valid? and other.value == value
end
|
#coerce(other)
122
123
124
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 122
def coerce(other)
return TimeVal.value(other, usage, position), self
end
|
#copy(changes = {})
115
116
117
118
119
120
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 115
def copy(changes = {})
TimeVal.value \
changes.fetch(:value, value),
changes.fetch(:usage, usage),
changes.fetch(:position, position)
end
|
111
112
113
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 111
def map
TimeVal.value(yield(value), usage, position)
end
|
#valid? ⇒ Boolean
106
107
108
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 106
def valid?
true
end
|