Class: Dbwatcher::Services::MermaidSyntax::BaseBuilder
- Inherits:
-
Object
- Object
- Dbwatcher::Services::MermaidSyntax::BaseBuilder
- Includes:
- Logging
- Defined in:
- lib/dbwatcher/services/mermaid_syntax/base_builder.rb
Overview
Base class for Mermaid syntax builders
Provides common functionality and configuration options for all Mermaid diagram builders. Subclasses should implement the build_from_dataset method.
Direct Known Subclasses
Instance Method Summary collapse
-
#build_empty(message) ⇒ String
Build empty diagram with message.
-
#build_from_dataset(dataset) ⇒ String
Build diagram content from dataset.
-
#initialize(config = {}) ⇒ BaseBuilder
constructor
Initialize a new builder with configuration.
Methods included from Logging
#debug_enabled?, #log_debug, #log_error, #log_info, #log_warn
Constructor Details
#initialize(config = {}) ⇒ BaseBuilder
Initialize a new builder with configuration
23 24 25 |
# File 'lib/dbwatcher/services/mermaid_syntax/base_builder.rb', line 23 def initialize(config = {}) @config = default_config.merge(config) end |
Instance Method Details
#build_empty(message) ⇒ String
Build empty diagram with message
39 40 41 |
# File 'lib/dbwatcher/services/mermaid_syntax/base_builder.rb', line 39 def build_empty() raise NotImplementedError, "Subclasses must implement build_empty" end |
#build_from_dataset(dataset) ⇒ String
Build diagram content from dataset
31 32 33 |
# File 'lib/dbwatcher/services/mermaid_syntax/base_builder.rb', line 31 def build_from_dataset(dataset) raise NotImplementedError, "Subclasses must implement build_from_dataset" end |