class LanguageTools::DetectLanguageDotCom
Public Class Methods
new(api_key)
click to toggle source
# File lib/esendex4soap.rb, line 12 def initialize(api_key) @api_key = api_key add_query_options! :key => @api_key end
Public Instance Methods
detect(text)
click to toggle source
# File lib/esendex4soap.rb, line 17 def detect(text) (post "detect", :extra_query => {:q => text})["data"]["detections"].first["language"] end