Sha256: c5fb045ffd621d2ee49463f1b8c16469d008a1c0ecd41664ad05106fba78b869
Contents?: true
Size: 497 Bytes
Versions: 24
Compression:
Stored size: 497 Bytes
Contents
module CloudSesame module Query module DSL module InspectMethod def inspect string = green("#<#{ self.class }:#{ object_id }\n{") string << compile.map { |k, v| "#{ green(k) } => #{ yellow(v) }" }.join(",\n ") string << green('}') string end private def green(string) color(32, string) end def yellow(string) color(33, string) end def color(code, string) "\e[#{ code }m#{ string }\e[0m" end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems