Class: ATSD::PropertiesQuery

Inherits:
BaseQuery
  • Object
show all
Defined in:
lib/atsd/queries/properties_query.rb

Overview

Class for building and executing Properties Query

Constant Summary collapse

TO_MILLISECONDS_LAMBDA =
->(v) do
  case v
    when Time
      v.to_i * 1_000
    else
      v.to_i
  end
end

Instance Attribute Summary

Attributes inherited from BaseQuery

#client

Instance Method Summary collapse

Methods inherited from BaseQuery

#initialize, #to_request_hash, #type

Constructor Details

This class inherits a constructor from ATSD::BaseQuery

Instance Method Details

#executeArray<Property>

Returns:



25
26
27
28
# File 'lib/atsd/queries/properties_query.rb', line 25

def execute
  result = @client.properties_query to_request_hash
  @result = result.map { |json| Property.new json }
end

#resultArray<Property>

Returns:



20
21
22
# File 'lib/atsd/queries/properties_query.rb', line 20

def result
  super
end