Class: Stupidedi::Versions::Common::ElementTypes::TimeVal::Invalid
Instance Attribute Summary collapse
#position, #usage
Instance Method Summary
collapse
empty, #time?, #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.
48
49
50
51
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 48
def initialize(value, usage, position)
@value = value
super(usage, position)
end
|
Instance Attribute Details
#value ⇒ Object
46
47
48
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 46
def value
@value
end
|
Instance Method Details
#==(other) ⇒ Boolean
96
97
98
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 96
def ==(other)
eql?(other)
end
|
#copy(changes = {})
100
101
102
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 100
def copy(changes = {})
self
end
|
#empty? ⇒ Boolean
57
58
59
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 57
def empty?
false
end
|
#inspect ⇒ String
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 68
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("TM.invalid#{id}") + "(#{ansi.invalid(@value.inspect)})"
end
|
62
63
64
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 62
def map
self
end
|
#to_s ⇒ String
86
87
88
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 86
def to_s
""
end
|
#to_x12(truncate = true) ⇒ String
91
92
93
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 91
def to_x12(truncate = true)
""
end
|
#valid? ⇒ Boolean
53
54
55
|
# File 'lib/stupidedi/versions/common/element_types/tm.rb', line 53
def valid?
false
end
|