Class: Atomy::Pattern::Splat

Inherits:
Atomy::Pattern show all
Defined in:
lib/atomy/pattern/splat.rb

Instance Attribute Summary collapse

Attributes inherited from Atomy::Pattern

#from_node

Instance Method Summary collapse

Methods inherited from Atomy::Pattern

#===, #inline_matches?, #target

Constructor Details

#initialize(pattern) ⇒ Splat

Returns a new instance of Splat.



7
8
9
# File 'lib/atomy/pattern/splat.rb', line 7

def initialize(pattern)
  @pattern = pattern
end

Instance Attribute Details

#patternObject (readonly)

Returns the value of attribute pattern.



5
6
7
# File 'lib/atomy/pattern/splat.rb', line 5

def pattern
  @pattern
end

Instance Method Details

#matches?(val) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/atomy/pattern/splat.rb', line 11

def matches?(val)
  @pattern.matches?(val)
end