Class: Stupidedi::Versions::Common::ElementTypes::FloatVal::Invalid
Instance Attribute Summary collapse
#position, #usage
Instance Method Summary
collapse
empty, #numeric?, #too_long?, #too_short?, value
#allowed?, #component?, #date?, #id?, #leaf?, #numeric?, #simple?, #string?, #time?, #too_long?, #too_short?
#element?, #size
#blank?, #characters, #component?, #composite?, #definition, #descriptor, #element?, #functional_group?, #interchange?, #invalid?, #leaf?, #loop?, #present?, #repeated?, #segment?, #separator?, #simple?, #size, #table?, #transaction_set?, #transmission?
Methods included from Color
ansi, #ansi
Constructor Details
#initialize(value, usage, position) ⇒ Invalid
Returns a new instance of Invalid.
60
61
62
63
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 60
def initialize(value, usage, position)
@value = value
super(usage, position)
end
|
Instance Attribute Details
#value ⇒ Object
58
59
60
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 58
def value
@value
end
|
Instance Method Details
#==(other) ⇒ Boolean
108
109
110
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 108
def ==(other)
eql?(other)
end
|
#copy(changes = {}) ⇒ Invalid
113
114
115
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 113
def copy(changes = {})
self
end
|
#empty? ⇒ Boolean
69
70
71
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 69
def empty?
false
end
|
#inspect ⇒ String
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 80
def inspect
id = definition.try do |d|
"[#{"% 5s" % d.id}: #{d.name}]".bind do |s|
if usage.forbidden?
ansi.forbidden(s)
elsif usage.required?
ansi.required(s)
else
ansi.optional(s)
end
end
end
ansi.element(" R.invalid#{id}") + "(#{ansi.invalid(@value.inspect)})"
end
|
74
75
76
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 74
def map
self
end
|
#to_s ⇒ String
98
99
100
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 98
def to_s
""
end
|
#to_x12(truncate = true) ⇒ String
103
104
105
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 103
def to_x12(truncate = true)
""
end
|
#valid? ⇒ Boolean
65
66
67
|
# File 'lib/stupidedi/versions/common/element_types/r.rb', line 65
def valid?
false
end
|