Class: Wurk::Metrics::Query::Result

Inherits:
Struct
  • Object
show all
Defined in:
lib/wurk/metrics/query.rb

Overview

size is a member name of upstream's struct, so it stays.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(granularity = :minutely) ⇒ Result

Returns a new instance of Result.



71
72
73
74
75
76
# File 'lib/wurk/metrics/query.rb', line 71

def initialize(granularity = :minutely)
  super
  self.granularity = granularity
  self.marks = []
  self.job_results = ::Hash.new { |h, k| h[k] = JobResult.new(granularity) }
end

Instance Attribute Details

#ends_at ⇒ Object

Returns the value of attribute ends_at

Returns:

  • (Object) —

    the current value of ends_at



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def ends_at
  @ends_at
end

#granularity ⇒ Object

Returns the value of attribute granularity

Returns:

  • (Object) —

    the current value of granularity



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def granularity
  @granularity
end

#job_results ⇒ Object

Returns the value of attribute job_results

Returns:

  • (Object) —

    the current value of job_results



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def job_results
  @job_results
end

#marks ⇒ Object

Returns the value of attribute marks

Returns:

  • (Object) —

    the current value of marks



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def marks
  @marks
end

#size ⇒ Object

Returns the value of attribute size

Returns:

  • (Object) —

    the current value of size



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def size
  @size
end

#starts_at ⇒ Object

Returns the value of attribute starts_at

Returns:

  • (Object) —

    the current value of starts_at



70
71
72
# File 'lib/wurk/metrics/query.rb', line 70

def starts_at
  @starts_at
end