Class: ImgToScript::Generators::Generator
- Inherits:
-
Object
- Object
- ImgToScript::Generators::Generator
- Includes:
- Dry::Configurable
- Defined in:
- lib/img_to_script/generators/generator.rb
Overview
Base class.
Direct Known Subclasses
HexMask::HexMask, RunLengthEncoding::RunLengthEncoding, Segmental::Segmental
Instance Method Summary collapse
-
#generate(image:, scr_width:, scr_height:) ⇒ Array<AbstractToken>
Generate abstract tokens that represent the image.
Instance Method Details
#generate(image:, scr_width:, scr_height:) ⇒ Array<AbstractToken>
Generate abstract tokens that represent the image.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/img_to_script/generators/generator.rb', line 33 def generate(image:, scr_width:, scr_height:) @image = image @scr_width = scr_width @scr_height = scr_height @x_offset = config.x_offset @y_offset = config.y_offset _generate_tokens @tokens end |