Class: Yogurt::Query
- Inherits:
-
Object
- Object
- Yogurt::Query
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/yogurt/query.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data, errors) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(data, errors) ⇒ Query
Returns a new instance of Query.
21 |
# File 'lib/yogurt/query.rb', line 21 def initialize(data, errors); end |
Class Method Details
.from_result(result) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/yogurt/query.rb', line 11 def self.from_result(result) data = result['data'] if data new(data, result['errors']) else Yogurt::ErrorResult::OnlyErrors.new(result['errors']) end end |