Class: Stupidedi::Versions::Common::ElementTypes::StringVal::Invalid
Instance Attribute Summary collapse
#position, #usage
Instance Method Summary
collapse
empty, #string?, #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.
150
151
152
153
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 150
def initialize(value, usage, position)
@value = value
super(usage, position)
end
|
Instance Attribute Details
#value ⇒ Object
148
149
150
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 148
def value
@value
end
|
Instance Method Details
#==(other) ⇒ Boolean
198
199
200
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 198
def ==(other)
eql?(other)
end
|
#copy(changes = {}) ⇒ Invalid
203
204
205
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 203
def copy(changes = {})
self
end
|
#empty? ⇒ Boolean
159
160
161
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 159
def empty?
false
end
|
#inspect ⇒ String
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 170
def inspect
id = definition.bind 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("AN.invalid#{id}") + "(#{ansi.invalid(@value.inspect)})"
end
|
164
165
166
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 164
def map
self
end
|
#to_s ⇒ String
188
189
190
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 188
def to_s
""
end
|
#to_x12(truncate = true) ⇒ String
193
194
195
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 193
def to_x12(truncate = true)
""
end
|
#valid? ⇒ Boolean
155
156
157
|
# File 'lib/stupidedi/versions/common/element_types/an.rb', line 155
def valid?
false
end
|