Skip to content

Instantly share code, notes, and snippets.

@wswidzinski
Last active July 30, 2018 08:14
Show Gist options
  • Save wswidzinski/634eda9cefece99daa53f8b849232635 to your computer and use it in GitHub Desktop.
Save wswidzinski/634eda9cefece99daa53f8b849232635 to your computer and use it in GitHub Desktop.
UserForm.call({}).message_set.messages.map { |m| { predicate: m.predicate, path: m.path } }
[
{:predicate=>:key?, :path=>[:name]},
{:predicate=>:filled?, :path=>[:name]},
{:predicate=>:str?, :path=>[:name]},
{:predicate=>:size?, :path=>[:name]},
{:predicate=>:key?, :path=>[:surname]},
{:predicate=>:filled?, :path=>[:surname]},
{:predicate=>:str?, :path=>[:surname]},
{:predicate=>:size?, :path=>[:surname]},
{:predicate=>:key?, :path=>[:email]},
{:predicate=>:filled?, :path=>[:email]},
{:predicate=>:str?, :path=>[:email]},
{:predicate=>:size?, :path=>[:email]},
{:predicate=>:unique?, :path=>[:email]},
{:predicate=>:key?, :path=>[:role]},
{:predicate=>:filled?, :path=>[:role]},
{:predicate=>:included_in?, :path=>[:role]},
{:predicate=>:key?, :path=>[:dealer_id]},
{:predicate=>:filled?, :path=>[:dealer_id]},
{:predicate=>:int?, :path=>[:dealer_id]}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment