Class: Stupidedi::Values::InvalidEnvelopeVal
- Inherits:
-
AbstractVal
- Object
- AbstractVal
- Stupidedi::Values::InvalidEnvelopeVal
- Defined in:
- lib/stupidedi/values/invalid_envelope_val.rb
Instance Attribute Summary collapse
- #children ⇒ Array<SegmentVal> readonly
Instance Method Summary collapse
- #copy(changes = {}) ⇒ SegmentVal
-
#initialize(children) ⇒ InvalidEnvelopeVal
constructor
A new instance of InvalidEnvelopeVal.
- #inspect ⇒ String
-
#leaf? ⇒ Boolean
False.
- #pretty_print(q) ⇒ void
-
#size ⇒ Integer
Number of segments in this subtree.
- #valid? ⇒ Boolean
Methods inherited from AbstractVal
#blank?, #characters, #component?, #composite?, #definition, #element?, #empty?, #functional_group?, #interchange?, #invalid?, #loop?, #present?, #repeated?, #segment?, #separator?, #simple?, #table?, #transaction_set?, #transmission?
Methods included from Color
Constructor Details
#initialize(children) ⇒ InvalidEnvelopeVal
Returns a new instance of InvalidEnvelopeVal.
13 14 15 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 13 def initialize(children) @children = children end |
Instance Attribute Details
#children ⇒ Array<SegmentVal> (readonly)
9 10 11 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 9 def children @children end |
Instance Method Details
#copy(changes = {}) ⇒ SegmentVal
18 19 20 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 18 def copy(changes = {}) InvalidEnvelopeVal.new(changes.fetch(:children, @children)) end |
#inspect ⇒ String
56 57 58 59 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 56 def inspect ansi.invalid("InvalidEnvelopeVal") << "(#{@children.map(&:inspect).join(', ')})" end |
#leaf? ⇒ Boolean
Returns false.
28 29 30 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 28 def leaf? false end |
#pretty_print(q) ⇒ void
This method returns an undefined value.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 37 def pretty_print(q) q.text(ansi.segment("InvalidEnvelopeVal")) q.group(2, "(", ")") do q.breakable "" q.text @children.first.reason q.text "," q.breakable @children.each do |e| unless q.current_group.first? q.text "," q.breakable end q.pp e end end end |
#size ⇒ Integer
Number of segments in this subtree
23 24 25 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 23 def size 0 end |
#valid? ⇒ Boolean
32 33 34 |
# File 'lib/stupidedi/values/invalid_envelope_val.rb', line 32 def valid? false end |