Module: Bolt::Util::Format
- Defined in:
- lib/bolt/util/format.rb
Class Method Summary collapse
-
.stringify(message) ⇒ String
Stringifies an object, formatted as valid JSON.
Class Method Details
.stringify(message) ⇒ String
Stringifies an object, formatted as valid JSON.
12 13 14 15 16 17 18 19 |
# File 'lib/bolt/util/format.rb', line 12 def stringify() formatted = () if formatted.is_a?(Hash) || formatted.is_a?(Array) ::JSON.pretty_generate(formatted) else formatted end end |