Exception: GoodGuide::Gibbon::MissingData
- Inherits:
-
RuntimeError
- Object
- StandardError
- GibbonError
- RuntimeError
- GoodGuide::Gibbon::MissingData
- Defined in:
- lib/goodguide/gibbon.rb
Instance Attribute Summary collapse
-
#annotations ⇒ Object
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
-
#initialize(type, id, annotations) ⇒ MissingData
constructor
A new instance of MissingData.
- #to_js(gibbon) ⇒ Object
Constructor Details
#initialize(type, id, annotations) ⇒ MissingData
194 195 196 |
# File 'lib/goodguide/gibbon.rb', line 194 def initialize(type, id, annotations) @query_type, @id, @annotations = type, id, annotations end |
Instance Attribute Details
#annotations ⇒ Object
Returns the value of attribute annotations.
192 193 194 |
# File 'lib/goodguide/gibbon.rb', line 192 def annotations @annotations end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
192 193 194 |
# File 'lib/goodguide/gibbon.rb', line 192 def id @id end |
#query_type ⇒ Object (readonly)
Returns the value of attribute query_type.
192 193 194 |
# File 'lib/goodguide/gibbon.rb', line 192 def query_type @query_type end |
Instance Method Details
#as_json ⇒ Object
202 203 204 205 206 207 208 209 |
# File 'lib/goodguide/gibbon.rb', line 202 def as_json(*) { 'status' => 'missing_data', 'query_type' => query_type, 'entity_id' => id, 'annotations' => annotations, } end |
#to_js(gibbon) ⇒ Object
198 199 200 |
# File 'lib/goodguide/gibbon.rb', line 198 def to_js(gibbon) gibbon['Failure'].query(@id, @annotations) end |