Class: PostRunner::QueryResult
- Inherits:
-
Object
- Object
- PostRunner::QueryResult
- Defined in:
- lib/postrunner/QueryResult.rb
Overview
Queries provide an abstract interface to retrieve individual values from Activities, Laps and so on. The result of a query is returned as a QueryResult object.
Instance Method Summary collapse
-
#initialize(value, schema) ⇒ QueryResult
constructor
Create a QueryResult object.
-
#to_s ⇒ Object
Conver the result into a text String.
Constructor Details
#initialize(value, schema) ⇒ QueryResult
Create a QueryResult object.
24 25 26 27 |
# File 'lib/postrunner/QueryResult.rb', line 24 def initialize(value, schema) @value = value @schema = schema end |
Instance Method Details
#to_s ⇒ Object
Conver the result into a text String.
30 31 32 |
# File 'lib/postrunner/QueryResult.rb', line 30 def to_s @schema.to_s(@value) end |