lib/grumlin/shortcuts/properties.rb in grumlin-0.15.6 vs lib/grumlin/shortcuts/properties.rb in grumlin-0.16.0

- old
+ new

@@ -3,16 +3,20 @@ module Grumlin module Shortcuts module Properties extend Grumlin::Shortcuts - shortcut :props do |*_args, **props| + shortcut :props do |props| + next if props.nil? # TODO: fixme, add proper support for **params + props.reduce(self) do |tt, (prop, value)| tt.property(prop, value) end end - shortcut :hasAll do |*, **props| + shortcut :hasAll do |props| + next if props.nil? # TODO: fixme, add proper support for **params + props.reduce(self) do |tt, (prop, value)| tt.has(prop, value) end end end