Class: RSpec::JsonMatchers::Utils::KeyPath::Extraction::Result Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/json_matchers/utils/key_path/extraction.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.

Only as a value object for internal communication

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, successful) ⇒ Result

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 Result.



136
137
138
139
# File 'lib/rspec/json_matchers/utils/key_path/extraction.rb', line 136

def initialize(object, successful)
  @object = object
  @successful = successful
end

Instance Attribute Details

#objectObject (readonly)

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.



134
135
136
# File 'lib/rspec/json_matchers/utils/key_path/extraction.rb', line 134

def object
  @object
end

#successfulObject (readonly)

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.



134
135
136
# File 'lib/rspec/json_matchers/utils/key_path/extraction.rb', line 134

def successful
  @successful
end

Instance Method Details

#failed?Boolean

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:

  • (Boolean)


141
142
143
# File 'lib/rspec/json_matchers/utils/key_path/extraction.rb', line 141

def failed?
  !successful
end