Class: Arugula::OrPart

Inherits:
Part
  • Object
show all
Includes:
MatchAny
Defined in:
lib/arugula/parts.rb

Instance Attribute Summary

Attributes included from MatchAny

#parts

Instance Method Summary collapse

Methods included from MatchAny

#match

Methods inherited from Part

all, inherited, type

Constructor Details

#initialize(*parts) ⇒ OrPart

Returns a new instance of OrPart.


73
74
75
76
# File 'lib/arugula/parts.rb', line 73

def initialize(*parts)
  super()
  @parts += parts
end

Instance Method Details

#to_sObject


78
79
80
# File 'lib/arugula/parts.rb', line 78

def to_s
  parts.join '|'
end