Class: RSpec::Matchers::BuiltIn::ReliableMatchData Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/matchers/built_in/match.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Used to wrap match data and make it reliable for 1.8.7

Instance Method Summary collapse

Constructor Details

#initialize(match_data) ⇒ ReliableMatchData

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ReliableMatchData.



85
86
87
# File 'lib/rspec/matchers/built_in/match.rb', line 85

def initialize(match_data)
  @match_data = match_data
end

Instance Method Details

#capturesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

returns an array of captures from the match data

Returns:

  • Array



110
111
112
# File 'lib/rspec/matchers/built_in/match.rb', line 110

def captures
  match_data.captures
end

#namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns match data names for named captures

Returns:

  • Array



94
95
96
# File 'lib/rspec/matchers/built_in/match.rb', line 94

def names
  []
end