Exception: Bade::Runtime::Block::MissingBlockDefinitionError
- Inherits:
-
RuntimeError
- Object
- StandardError
- RuntimeError
- Bade::Runtime::Block::MissingBlockDefinitionError
- Defined in:
- lib/bade/runtime/block.rb
Instance Attribute Summary collapse
-
#context ⇒ Symbol
Context of missing block, allowed values are :render and :call.
- #name ⇒ String
Attributes inherited from RuntimeError
#print_locations_warning, #template_backtrace
Instance Method Summary collapse
-
#initialize(name, context, msg, template_backtrace) ⇒ MissingBlockDefinitionError
constructor
A new instance of MissingBlockDefinitionError.
- #message ⇒ Object
Methods inherited from RuntimeError
#__formatted_backtrace, #cause, process_locations, #to_s, wrap_existing_error
Constructor Details
#initialize(name, context, msg, template_backtrace) ⇒ MissingBlockDefinitionError
Returns a new instance of MissingBlockDefinitionError.
17 18 19 20 21 22 23 24 |
# File 'lib/bade/runtime/block.rb', line 17 def initialize(name, context, msg, template_backtrace) super(msg, template_backtrace) self.name = name self.context = context @message = msg end |
Instance Attribute Details
#context ⇒ Symbol
Returns context of missing block, allowed values are :render and :call.
15 16 17 |
# File 'lib/bade/runtime/block.rb', line 15 def context @context end |
Instance Method Details
#message ⇒ Object
26 27 28 |
# File 'lib/bade/runtime/block.rb', line 26 def @message || "Block `#{name}` must have block definition to #{context}." end |