Class: Stupidedi::Versions::Common::ElementTypes::FloatVal::Valid
Instance Attribute Summary
#position, #usage
Instance Method Summary
collapse
empty, #numeric?, #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
141
142
143
144
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 141
def ==(other)
other = FloatVal.value(other, usage, position)
other.valid? and other.value == value
end
|
#coerce(other)
123
124
125
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 123
def coerce(other)
return FloatVal.value(other, usage, position), self
end
|
#copy(changes = {}) ⇒ Empty
128
129
130
131
132
133
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 128
def copy(changes = {})
FloatVal.value \
changes.fetch(:value, value),
changes.fetch(:usage, usage),
changes.fetch(:position, position)
end
|
136
137
138
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 136
def map
FloatVal.value(yield(value), usage, position)
end
|
#valid? ⇒ Boolean
119
120
121
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 119
def valid?
true
end
|