Module: Shojiku::Echo
- Defined in:
- lib/shojiku/errors.rb
Overview
Echoing caller-supplied text back in a message or a log line.
Template names and provider names reach exception reporters and log files, so they are stripped of control characters and bounded before they are quoted — the same discipline the engine applies to the values it echoes. One place for it, because every path that echoes owes the same thing.
Constant Summary collapse
- LIMIT =
80
Class Method Summary collapse
Class Method Details
.bounded(text) ⇒ Object
78 79 80 |
# File 'lib/shojiku/errors.rb', line 78 def self.bounded(text) text.to_s.delete("\x00-\x1f\x7f")[0, LIMIT] end |