Class: Methods::Translate

Inherits:
Object
  • Object
show all
Defined in:
lib/methods/translate.rb

Class Method Summary collapse

Class Method Details

.run(api_key, text, from, to) ⇒ Object



4
5
6
# File 'lib/methods/translate.rb', line 4

def self.run(api_key, text, from, to)
 Api.post(path,{key: api_key, lang: "#{from}-#{to}", text: text, format: 'json'})
end