lib/grumlin/shortcuts/properties.rb in grumlin-0.17.0 vs lib/grumlin/shortcuts/properties.rb in grumlin-0.18.0

- old
+ new

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