Class: NATOPhone::Decoder

Inherits:
Base
  • Object
show all
Defined in:
lib/app.rb

Overview

End of class Encoder

Instance Attribute Summary collapse

Attributes inherited from Base

#args, #translate, #yell

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Decoder

Returns a new instance of Decoder.



95
96
97
98
99
100
101
# File 'lib/app.rb', line 95

def initialize(args)
  super(args)
  @dic = otan_alphabet_decode()
  @decode = convert(args)
  @translate = @decode.join()
  @yell = @translate.upcase
end

Instance Attribute Details

#decodeObject

Returns the value of attribute decode.



93
94
95
# File 'lib/app.rb', line 93

def decode
  @decode
end

Instance Method Details

#to_aObject



116
117
118
# File 'lib/app.rb', line 116

def to_a
  @decode
end

#to_jsonObject



103
104
105
106
107
108
109
110
# File 'lib/app.rb', line 103

def to_json
  {
    'args' => @args,
    'decode' => @decode,
    'translate' => @translate,
    'yell' => @yell
  }.to_json
end

#to_sObject



112
113
114
# File 'lib/app.rb', line 112

def to_s
  @translate
end