Class: RSpec::GraphQLResponse::Validators::ValidationResult
- Inherits:
-
Object
- Object
- RSpec::GraphQLResponse::Validators::ValidationResult
- Defined in:
- lib/rspec/graphql_response/validators/validation_result.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.fail(reason, args) ⇒ Object
9 10 11 |
# File 'lib/rspec/graphql_response/validators/validation_result.rb', line 9 def self.fail(reason, args) self.new(false, reason, args) end |
.pass ⇒ Object
5 6 7 |
# File 'lib/rspec/graphql_response/validators/validation_result.rb', line 5 def self.pass self.new(true) end |
Instance Method Details
#reason ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/rspec/graphql_response/validators/validation_result.rb', line 17 def reason if @reason.is_a? Proc @reason = @reason.call(*@args) end @reason end |
#valid? ⇒ Boolean
13 14 15 |
# File 'lib/rspec/graphql_response/validators/validation_result.rb', line 13 def valid? @is_valid end |