Sha256: d36c76615cc18dd880582efdf18b2ebdf93ed14ed8e11795c5510733441eff2e

Contents?: true

Size: 565 Bytes

Versions: 3

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

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)|
          tt.property(prop, value)
        end
      end

      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
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grumlin-0.17.0 lib/grumlin/shortcuts/properties.rb
grumlin-0.16.1 lib/grumlin/shortcuts/properties.rb
grumlin-0.16.0 lib/grumlin/shortcuts/properties.rb