class Lib::TL1::Message::Field::AcknowledgmentCode

Constants

ACK_CODE

Public Class Methods

new(field) click to toggle source
Calls superclass method
# File lib/lib/tl1/message/field/acknowledgment_code.rb, line 22
def initialize(field)
  unless ACK_CODE.key? field.to_s.downcase.to_sym
    raise ArgumentError, "Unknown Acknowledgment Code - #{field}"
  end

  super field.to_s.downcase.to_sym
end

Public Instance Methods

description() click to toggle source
# File lib/lib/tl1/message/field/acknowledgment_code.rb, line 38
def description
  ACK_CODE[@field]
end
to_s() click to toggle source
# File lib/lib/tl1/message/field/acknowledgment_code.rb, line 30
def to_s
  @field.to_s.upcase
end
to_sym() click to toggle source
# File lib/lib/tl1/message/field/acknowledgment_code.rb, line 34
def to_sym
  @field
end