-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
Hey there!
I found the following issue, it does not highlight all fields of such object.
I understand, that it can be complex problem, but maybe anyone has an idea how to solve this?
s = '<Result:false <Skill {"policy.default.eval"=>#<Proc:0x007fc73d75cfb8@/Users/mexx/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/trailblazer-2.0.7/lib/trailblazer/operation/guard.rb:14 (lambda)>, "policy.default"=>nil, "result.policy.default"=><Result:true {} >, "model.class"=>Blog::Post(id: integer, title: string, body: text, published: boolean, created_at: datetime, updated_at: datetime), "model.action"=>:new, "model"=>#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, "result.model"=><Result:true {} >, "contract.default"=>#<Blog::Post::Contracts::Create:0x007fc73aa66f18 @fields={"title"=>"test", "body"=>"123"}, @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, @mapper=#<#<Class:0x007fc73aa66450>:0x007fc73aa5cf18 @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>>, @_changes={"title"=>true, "body"=>true}, @errors=#<Reform::Contract::Errors:0x007fc73aa542c8 @errors={:body=>["size cannot be less than 9", "size cannot be less than 9"]}>>, "contract.default.params"=>{:title=>"test", :body=>"123"}, "representer.default.class"=>false, "result.contract.default"=>#<Blog::Post::Contracts::Create:0x007fc73aa66f18 @fields={"title"=>"test", "body"=>"123"}, @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, @mapper=#<#<Class:0x007fc73aa66450>:0x007fc73aa5cf18 @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>>, @_changes={"title"=>true, "body"=>true}, @errors=#<Reform::Contract::Errors:0x007fc73aa542c8 @errors={:body=>["size cannot be less than 9", "size cannot be less than 9"]}>>} {:current_user=>true, "params"=>{:blog_post=>{:title=>"test", :body=>"123"}}} {"pipetree"=>[>operation.new,>policy.default.eval,>Nested(Blog::Post::Create::Present),>contract.default.validate,>persist.save,>notify!]}> >'
irb(main):008:0> CodeRay.scan(s, :ruby).term
=> "<\e[35mResult\e[0m:\e[1;36mfalse\e[0m <\e[1;34;4mSkill\e[0m {\e[31m\e[1;31m\"\e[0m\e[31mpolicy.default.eval\e[1;31m\"\e[0m\e[31m\e[0m=>\e[1;30m#<Proc:0x007fc73d75cfb8@/Users/mexx/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/trailblazer-2.0.7/lib/trailblazer/operation/guard.rb:14 (lambda)>, \"policy.default\"=>nil, \"result.policy.default\"=><Result:true {} >, \"model.class\"=>Blog::Post(id: integer, title: string, body: text, published: boolean, created_at: datetime, updated_at: datetime), \"model.action\"=>:new, \"model\"=>#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, \"result.model\"=><Result:true {} >, \"contract.default\"=>#<Blog::Post::Contracts::Create:0x007fc73aa66f18 @fields={\"title\"=>\"test\", \"body\"=>\"123\"}, @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, @mapper=#<#<Class:0x007fc73aa66450>:0x007fc73aa5cf18 @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>>, @_changes={\"title\"=>true, \"body\"=>true}, @errors=#<Reform::Contract::Errors:0x007fc73aa542c8 @errors={:body=>[\"size cannot be less than 9\", \"size cannot be less than 9\"]}>>, \"contract.default.params\"=>{:title=>\"test\", :body=>\"123\"}, \"representer.default.class\"=>false, \"result.contract.default\"=>#<Blog::Post::Contracts::Create:0x007fc73aa66f18 @fields={\"title\"=>\"test\", \"body\"=>\"123\"}, @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>, @mapper=#<#<Class:0x007fc73aa66450>:0x007fc73aa5cf18 @model=#<Blog::Post id: nil, title: nil, body: nil, published: nil, created_at: nil, updated_at: nil>>, @_changes={\"title\"=>true, \"body\"=>true}, @errors=#<Reform::Contract::Errors:0x007fc73aa542c8 @errors={:body=>[\"size cannot be less than 9\", \"size cannot be less than 9\"]}>>} {:current_user=>true, \"params\"=>{:blog_post=>{:title=>\"test\", :body=>\"123\"}}} {\"pipetree\"=>[>operation.new,>policy.default.eval,>Nested(Blog::Post::Create::Present),>contract.default.validate,>persist.save,>notify!]}> >\e[0m"
It seems that problem is related to parsing #<Proc:0x007fc73d75cfb8@/Users/mexx/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/trailblazer-2.0.7/lib/trailblazer/operation/guard.rb:14 (lambda)>
Procs and other nested objects.
Metadata
Metadata
Assignees
Labels
No labels