class NATO::Text

Attributes

natified[R]
original[R]
pronunciation[R]
to_nato[R]
to_s[R]

Public Class Methods

new(sentence) click to toggle source
# File lib/NATO/text.rb, line 8
def initialize(sentence)
  @original = sentence

  natify sentence
end

Public Instance Methods

say() click to toggle source
# File lib/NATO/text.rb, line 17
def say
  NATO::Say.(self)
end

Private Instance Methods

natify(sentence) click to toggle source
# File lib/NATO/text.rb, line 23
def natify(sentence)
  Parser.instance.natify(sentence).tap do |natified|
    @natified = natified.map(&:first).join(" ")
    @pronunciation = natified.map(&:last).join(" ")
  end
end