Exception: GoodGuide::Gibbon::MissingData
- Inherits:
-
RuntimeError
- Object
- StandardError
- RuntimeError
- GoodGuide::Gibbon::MissingData
- Defined in:
- lib/goodguide/gibbon.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
readonly
Returns the value of attribute annotations.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#query_type ⇒ Object
readonly
Returns the value of attribute query_type.
Instance Method Summary collapse
- #as_json ⇒ Object
- #equals(other) ⇒ Object
-
#initialize(type, id, annotations) ⇒ MissingData
constructor
A new instance of MissingData.
Constructor Details
#initialize(type, id, annotations) ⇒ MissingData
Returns a new instance of MissingData.
179 180 181 |
# File 'lib/goodguide/gibbon.rb', line 179 def initialize(type, id, annotations) @query_type, @id, @annotations = type, id, annotations end |
Instance Attribute Details
#annotations ⇒ Object (readonly)
Returns the value of attribute annotations.
178 179 180 |
# File 'lib/goodguide/gibbon.rb', line 178 def annotations @annotations end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
178 179 180 |
# File 'lib/goodguide/gibbon.rb', line 178 def id @id end |
#query_type ⇒ Object (readonly)
Returns the value of attribute query_type.
178 179 180 |
# File 'lib/goodguide/gibbon.rb', line 178 def query_type @query_type end |
Instance Method Details
#as_json ⇒ Object
191 192 193 194 195 196 197 198 |
# File 'lib/goodguide/gibbon.rb', line 191 def as_json(*) { 'status' => 'missing_data', 'query_type' => query_type, 'entity_id' => id, 'annotations' => annotations, } end |
#equals(other) ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/goodguide/gibbon.rb', line 183 def equals(other) [ query_type == other.query_type, id == other.id, annotations == other.annotations ].all? end |