Class: NATOPhone::Encoder
Overview
End of class Base
Instance Attribute Summary collapse
-
#encode ⇒ Object
Returns the value of attribute encode.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args) ⇒ Encoder
constructor
A new instance of Encoder.
- #to_a ⇒ Object
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(args) ⇒ Encoder
Returns a new instance of Encoder.
37 38 39 40 41 42 43 |
# File 'lib/app.rb', line 37 def initialize(args) super(args) @dic = otan_alphabet_encode() @encode = convert(args) @translate = @encode.join(' ') @yell = @translate.upcase end |
Instance Attribute Details
#encode ⇒ Object
Returns the value of attribute encode.
35 36 37 |
# File 'lib/app.rb', line 35 def encode @encode end |
Instance Method Details
#to_a ⇒ Object
58 59 60 |
# File 'lib/app.rb', line 58 def to_a @encode end |
#to_json ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/app.rb', line 45 def to_json { 'args' => @args, 'encode' => @encode, 'translate' => @translate, 'yell' => @yell }.to_json end |
#to_s ⇒ Object
54 55 56 |
# File 'lib/app.rb', line 54 def to_s @translate end |