Module: Dux::FlockMethods

Defined in:
lib/dux/flock_methods.rb

Overview

Can be included on any Array or Array-like (implements #to_a) to grant it a fluent method for generating duck checks.

Instance Method Summary collapse

Instance Method Details

#duckify(type: :all, include_all: false) ⇒ <Proc>

Parameters:

  • type (:all, :any, :none) (defaults to: :all)
  • include_all (Boolean) (defaults to: false)

Returns:

  • (<Proc>)


8
9
10
# File 'lib/dux/flock_methods.rb', line 8

def duckify(type: :all, include_all: false)
  Dux.flock type, to_a, include_all: include_all
end