Class: ImgToScript::Translator

Inherits:
Object
  • Object
show all
Defined in:
lib/img_to_script/translator.rb

Overview

Base class.

Translates abstract tokens to more specific target language statements.

Instance Method Summary collapse

Instance Method Details

#translate(abstract_tokens, **kwargs) ⇒ Array<Object>

Translate the abstract tokens to the target language tokens.

Parameters:

  • abstract_tokens (Array<AbstractToken>)
  • **kwargs (Hash{ Symbol => Object })

    Options.

Returns:

  • (Array<Object>)


21
22
23
24
25
# File 'lib/img_to_script/translator.rb', line 21

def translate(abstract_tokens, **kwargs)
  _translate(
    Array(abstract_tokens, **kwargs)
  )
end