Class: DMatch::Or

Inherits:
Object show all
Defined in:
lib/destructure/types.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*patterns) ⇒ Or

Returns a new instance of Or.



80
81
82
# File 'lib/destructure/types.rb', line 80

def initialize(*patterns)
  @patterns = flatten(patterns)
end

Instance Attribute Details

#patternsObject (readonly)

Returns the value of attribute patterns.



79
80
81
# File 'lib/destructure/types.rb', line 79

def patterns
  @patterns
end