class Lib::TL1::Message::Output

Attributes

cc[R]
completion_code[R]
correlation_tag[R]
ctag[R]
date[R]
sid[R]
system_identifier[R]
text_block[R]
time[R]

Public Class Methods

new(sid: nil, date: nil, time: nil, ctag: nil, cc: nil, text_block: nil) { |self| ... } click to toggle source
# File lib/lib/tl1/message/output.rb, line 16
def initialize(sid: nil, date: nil, time: nil, ctag: nil, cc: nil, text_block: nil)
  if block_given?
    yield self
  else
    self.sid = sid
    self.date = date
    self.time = time
    self.ctag = ctag
    self.cc = cc
    self.text_block = text_block
  end
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/lib/tl1/message/output.rb, line 29
def <=>(other)
  return nil unless instance_of? other.class

  to_s <=> other.to_s
end
cc=(cc) click to toggle source
# File lib/lib/tl1/message/output.rb, line 54
def cc=(cc)
  @cc = cc.is_a?(Field::CompletionCode) ? cc : Field::CompletionCode.new(cc)
end
Also aliased as: completion_code=
completion_code=(cc)
Alias for: cc=
correlation_tag=(ctag)
Alias for: ctag=
ctag=(ctag) click to toggle source
# File lib/lib/tl1/message/output.rb, line 64
def ctag=(ctag)
  @ctag = ctag.is_a?(Field::CorrelationTag) ? ctag : Field::CorrelationTag.new(ctag)
end
Also aliased as: correlation_tag=
date=(date) click to toggle source
# File lib/lib/tl1/message/output.rb, line 46
def date=(date)
  @date = date.is_a?(Field::Date) ? date : Field::Date.new(date)
end
sid=(sid) click to toggle source
# File lib/lib/tl1/message/output.rb, line 40
def sid=(sid)
  @sid = sid.is_a?(Field::SystemIdentifier) ? sid : Field::SystemIdentifier.new(sid)
end
Also aliased as: system_identifier=
system_identifier=(sid)
Alias for: sid=
text_block=(text_block) click to toggle source
# File lib/lib/tl1/message/output.rb, line 60
def text_block=(text_block)
  @text_block = text_block.is_a?(Field::TextBlock) ? text_block : Field::TextBlock.new(text_block)
end
time=(time) click to toggle source
# File lib/lib/tl1/message/output.rb, line 50
def time=(time)
  @time = time.is_a?(Field::Time) ? time : Field::Time.new(time)
end
to_s() click to toggle source
# File lib/lib/tl1/message/output.rb, line 35
def to_s
  "\r\n\n   #{sid} #{date} #{time}\r\nM  #{ctag} #{cc}\r\n   #{text_block}\r\n;"
end
Also aliased as: to_str
to_str()
Alias for: to_s