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.
130 131 132 133 134 135 136 |
# File 'lib/ast/merge.rb', line 130 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.
125 126 127 |
# File 'lib/ast/merge.rb', line 125 def placeholder @placeholder end |