Class: Phlex::Sinatra::TypeError
Constant Summary collapse
- MAX_SIZE =
32
Instance Method Summary collapse
-
#initialize(obj) ⇒ TypeError
constructor
A new instance of TypeError.
Constructor Details
#initialize(obj) ⇒ TypeError
Returns a new instance of TypeError.
15 16 17 18 19 |
# File 'lib/phlex-sinatra.rb', line 15 def initialize(obj) content = obj.inspect content = content[0, MAX_SIZE] + '…' if content.size > MAX_SIZE super "Expected a Phlex instance, received #{content}" end |