Examples:
AwesomePrintInspect
output for byebug
or pry
.
class Service
include ::ConvenientService::Standard::Config
include ::ConvenientService::AwesomePrintInspect::Config
def result
success(foo: :bar)
end
end
Service.result
# =>
{
:ConvenientService => {
:entity => "Result",
:service => "Service",
:status => :success,
:data_keys => [
[0] :foo
]
}
}
AwesomePrintInspect
output for binding.break
or irb
.
class Service
include ::ConvenientService::Standard::Config
include ::ConvenientService::AwesomePrintInspect::Config
def result
success(foo: :bar)
end
end
Service.result
# =>
{
:ConvenientService^[[0;37m => ^[[0m{
:entity^[[0;37m => ^[[0m^[[0;33m"Result"^[[0m,
:service^[[0;37m => ^[[0m^[[0;33m"Service"^[[0m,
:status^[[0;37m => ^[[0m^[[0;36m:success^[[0m,
:data_keys^[[0;37m => ^[[0m[
^[[1;37m[0] ^[[0m^[[0;36m:foo^[[0m
]
}
}
AwesomePrintInspect
output for binding.break
or irb
with Reline
hack.
class Service
include ::ConvenientService::Standard::Config
include ::ConvenientService::AwesomePrintInspect::Config
def result
success(foo: :bar)
end
end
class Reline::Unicode
def self.escape_for_print(str)
str
end
end
Service.result
# =>
{
:ConvenientService => {
:entity => "Result",
:service => "Service",
:status => :success,
:data_keys => [
[0] :foo
]
}
}