Module: Hornetseye::BOOL::Match

Included in:
Node
Defined in:
lib/multiarray/bool.rb

Overview

Namespace containing method for matching elements of type BOOL

See Also:

Instance Method Summary collapse

Instance Method Details

#fit(*values) ⇒ Class

Method for matching elements of type BOOL

Parameters:

  • *values (Array<Object>)

    Values to find matching native element type for.

Returns:

  • (Class)

    Native type fitting all values.

See Also:



125
126
127
128
129
130
131
# File 'lib/multiarray/bool.rb', line 125

def fit( *values )
  if values.all? { |value| [ false, true ].member? value }
    BOOL
  else
    super *values
  end
end