Exception: Ast::Merge::PlaceholderCollisionError
- Defined in:
- lib/ast/merge.rb
Overview
Raised when the document contains text that matches the region placeholder.
Region placeholders are used internally to mark positions in a document
where nested regions will be substituted after merging. If the document
already contains text that looks like a placeholder, the merge cannot
proceed safely.
Instance Attribute Summary collapse
-
#placeholder ⇒ String
readonly
The placeholder that caused the collision.
Instance Method Summary collapse
-
#initialize(placeholder) ⇒ PlaceholderCollisionError
constructor
Initialize a new PlaceholderCollisionError.
Constructor Details
#initialize(placeholder) ⇒ PlaceholderCollisionError
Initialize a new PlaceholderCollisionError.
133 134 135 136 137 138 139 |
# File 'lib/ast/merge.rb', line 133 def initialize(placeholder) @placeholder = placeholder super( "Document contains placeholder text '#{placeholder}'. " \ "Use the :region_placeholder option to specify a custom placeholder." ) end |
Instance Attribute Details
#placeholder ⇒ String (readonly)
Returns The placeholder that caused the collision.
128 129 130 |
# File 'lib/ast/merge.rb', line 128 def placeholder @placeholder end |