Class: ApiValidator::Spec::Results
- Inherits:
-
Object
- Object
- ApiValidator::Spec::Results
- Includes:
- Mixins::DeepMerge
- Defined in:
- lib/api-validator/spec/results.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(validator, expectations_results) ⇒ Results
constructor
A new instance of Results.
- #merge!(other) ⇒ Object
Methods included from Mixins::DeepMerge
Constructor Details
#initialize(validator, expectations_results) ⇒ Results
Returns a new instance of Results.
8 9 10 11 12 13 14 15 |
# File 'lib/api-validator/spec/results.rb', line 8 def initialize(validator, expectations_results) @name = validator.name @results = { @name => { :results => expectations_results } } end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/api-validator/spec/results.rb', line 7 def name @name end |
#results ⇒ Object (readonly)
Returns the value of attribute results.
7 8 9 |
# File 'lib/api-validator/spec/results.rb', line 7 def results @results end |
Instance Method Details
#as_json(options = {}) ⇒ Object
22 23 24 |
# File 'lib/api-validator/spec/results.rb', line 22 def as_json( = {}) results end |
#merge!(other) ⇒ Object
17 18 19 20 |
# File 'lib/api-validator/spec/results.rb', line 17 def merge!(other) deep_merge!(results[name], other.results) self end |