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
Instance Method Summary collapse
-
#initialize(name, context, msg = nil) ⇒ MissingBlockDefinitionError
constructor
A new instance of MissingBlockDefinitionError.
- #message ⇒ Object
Constructor Details
#initialize(name, context, msg = nil) ⇒ 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 = nil) super() self.name = name self.context = context = 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 || "Block `#{name}` must have block definition to #{context}." end |