module ScrapCbf::Printable
Outputs data to stdout through kernel#puts. Useful for debugging entities.
Public Instance Methods
print(pretty = true)
click to toggle source
Outputs data in JSON format
@param [Boolean] pretty for use JSON#pretty_generate or not. @return [Nil]
# File lib/scrap_cbf/printable.rb, line 11 def print(pretty = true) if pretty puts JSON.pretty_generate(to_h) else puts to_json end end