Class: Filigree::WildcardPattern

Inherits:
BasicPattern show all
Includes:
Singleton
Defined in:
lib/filigree/match.rb

Overview

A pattern that matches any object

Instance Method Summary collapse

Methods inherited from BasicPattern

#<=>, #as

Methods included from AbstractClass

#abstract_method, extended, #install_icvars, #new

Instance Method Details

#match?(_, _) ⇒ true

Return true for any object and don’t create any bindings.

Returns:

  • (true)


324
325
326
# File 'lib/filigree/match.rb', line 324

def match?(_, _)
	true
end

#weightObject



328
329
330
# File 'lib/filigree/match.rb', line 328

def weight
	4
end