Class: Roda::RodaPlugins::Phlex::TypeError
- Defined in:
- lib/roda/plugins/phlex.rb
Overview
Custom TypeError class for Phlex errors.
Constant Summary collapse
- MAX_SIZE =
32
Instance Method Summary collapse
-
#initialize(obj) ⇒ TypeError
constructor
Initializes a TypeError instance.
Constructor Details
#initialize(obj) ⇒ TypeError
Initializes a TypeError instance.
38 39 40 41 42 |
# File 'lib/roda/plugins/phlex.rb', line 38 def initialize(obj) content = obj.inspect content = content[0, MAX_SIZE] + "…" if content.size > MAX_SIZE super("Expected a Phlex instance, received #{content}") end |