Class: QrForge::Components::ForgeComponent
- Inherits:
-
Object
- Object
- QrForge::Components::ForgeComponent
- Defined in:
- lib/qr_forge/components/forge_component.rb
Overview
Base class for all components in the QR code design.
Direct Known Subclasses
EyeInner::Circle, EyeInner::Square, EyeOuter::Circle, EyeOuter::Square, Module::Circle, Module::Square
Instance Method Summary collapse
-
#draw(y:, x:, quiet_zone:, area:, **_) ⇒ Object
TODO: For modules pass the next and prev module to change design based on if there is another module next or behind.
-
#initialize(xml_builder:, test_id: nil) ⇒ ForgeComponent
constructor
A new instance of ForgeComponent.
Constructor Details
#initialize(xml_builder:, test_id: nil) ⇒ ForgeComponent
Returns a new instance of ForgeComponent.
10 11 12 13 |
# File 'lib/qr_forge/components/forge_component.rb', line 10 def initialize(xml_builder:, test_id: nil) @xml_builder = xml_builder @test_id = test_id end |
Instance Method Details
#draw(y:, x:, quiet_zone:, area:, **_) ⇒ Object
TODO: For modules pass the next and prev module to change design based on if there is another module next or behind
21 22 23 |
# File 'lib/qr_forge/components/forge_component.rb', line 21 def draw(y:, x:, quiet_zone:, area:, **_) raise NotImplementedError, "FinderBorder::Base subclasses must implement `draw`" end |