Class: Apiary::Okapi::ValidationResult
- Inherits:
-
Object
- Object
- Apiary::Okapi::ValidationResult
- Defined in:
- lib/okapi/resources.rb
Instance Attribute Summary collapse
-
#body_diff ⇒ Object
Returns the value of attribute body_diff.
-
#body_pass ⇒ Object
Returns the value of attribute body_pass.
-
#error ⇒ Object
Returns the value of attribute error.
-
#header_diff ⇒ Object
Returns the value of attribute header_diff.
-
#header_pass ⇒ Object
Returns the value of attribute header_pass.
-
#schema_res ⇒ Object
Returns the value of attribute schema_res.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#body_diff ⇒ Object
Returns the value of attribute body_diff.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def body_diff @body_diff end |
#body_pass ⇒ Object
Returns the value of attribute body_pass.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def body_pass @body_pass end |
#error ⇒ Object
Returns the value of attribute error.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def error @error end |
#header_diff ⇒ Object
Returns the value of attribute header_diff.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def header_diff @header_diff end |
#header_pass ⇒ Object
Returns the value of attribute header_pass.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def header_pass @header_pass end |
#schema_res ⇒ Object
Returns the value of attribute schema_res.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def schema_res @schema_res end |
#status ⇒ Object
Returns the value of attribute status.
33 34 35 |
# File 'lib/okapi/resources.rb', line 33 def status @status end |
Instance Method Details
#get_status ⇒ Object
39 40 41 42 |
# File 'lib/okapi/resources.rb', line 39 def get_status return true if not @error and @header_pass and ((schema and schema_pass) or (not schema and @body_pass)) return false end |
#schema ⇒ Object
44 45 46 |
# File 'lib/okapi/resources.rb', line 44 def schema !(@schema_res == false) end |
#schema_pass ⇒ Object
48 49 50 |
# File 'lib/okapi/resources.rb', line 48 def schema_pass not schema or schema and @schema_res and not @schema_res['errors'] end |