class AjaxCat::Request::Simple

Public Class Methods

new(sentence) click to toggle source
Calls superclass method AjaxCat::Request::Raw::new
# File lib/ajax-cat/request/simple.rb, line 9
def initialize(sentence)
        super(sentence)
        @best_translation = false
end

Public Instance Methods

process_line(line) click to toggle source
# File lib/ajax-cat/request/simple.rb, line 18
def process_line(line)
        @best_translation = line.split(" ||| ")[1] unless @best_translation
end
result() click to toggle source
# File lib/ajax-cat/request/simple.rb, line 14
def result
        @best_translation
end