Class: Mobb::Matcher::Matched

Inherits:
Object
  • Object
show all
Defined in:
lib/mobb/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern, matched) ⇒ Matched

Returns a new instance of Matched.



31
# File 'lib/mobb/base.rb', line 31

def initialize(pattern, matched) @pattern, @matched, @captures = pattern, matched, matched.captures; end

Instance Attribute Details

#capturesObject (readonly)

Returns the value of attribute captures.



30
31
32
# File 'lib/mobb/base.rb', line 30

def captures
  @captures
end

#matchedObject (readonly)

Returns the value of attribute matched.



30
31
32
# File 'lib/mobb/base.rb', line 30

def matched
  @matched
end

#patternObject (readonly)

Returns the value of attribute pattern.



30
31
32
# File 'lib/mobb/base.rb', line 30

def pattern
  @pattern
end