Class: ImgToScript::Formatter
- Inherits:
-
Object
- Object
- ImgToScript::Formatter
- Includes:
- Dry::Configurable
- Defined in:
- lib/img_to_script/formatter.rb
Overview
Base class.
Formatters format array of target language tokens to an executable script.
A formatter’s responsibility is to label BASIC lines, put separators between the statements’ and their arguments, etc.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#script ⇒ Object
readonly
Returns the value of attribute script.
Instance Method Summary collapse
-
#format(tokens, **kwargs) ⇒ Array<String>
Format an array of the language tokens to an executable script.
Instance Attribute Details
#script ⇒ Object (readonly)
Returns the value of attribute script.
14 15 16 |
# File 'lib/img_to_script/formatter.rb', line 14 def script @script end |
Instance Method Details
#format(tokens, **kwargs) ⇒ Array<String>
Format an array of the language tokens to an executable script.
30 31 32 |
# File 'lib/img_to_script/formatter.rb', line 30 def format(tokens, **kwargs) _format(tokens, **kwargs) end |