class PostRunner::QueryResult

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.

Public Class Methods

new(value, schema) click to toggle source

Create a QueryResult object. @param value [any] Result of the query @param schema [Schema] A reference to the Schema of the queried

attribute.
# File lib/postrunner/QueryResult.rb, line 24
def initialize(value, schema)
  @value = value
  @schema = schema
end

Public Instance Methods

to_s() click to toggle source

Conver the result into a text String.

# File lib/postrunner/QueryResult.rb, line 30
def to_s
  @schema.to_s(@value)
end