Class: Qmetrics::Stats

Inherits:
Caller
  • Object
show all
Defined in:
lib/qmetrics/stats.rb

Instance Method Summary collapse

Methods inherited from Caller

#api_methods, #get, load_api_methods

Constructor Details

#initialize(from:, to:, **args) ⇒ Stats

Returns a new instance of Stats.



6
7
8
9
10
# File 'lib/qmetrics/stats.rb', line 6

def initialize(from: , to: , **args)
  super(args)
  @from = from
  @to = to
end

Instance Method Details

#to_sObject



12
13
14
15
16
17
# File 'lib/qmetrics/stats.rb', line 12

def to_s
  "/QmStats" + super +
  "&from=#{@from.strftime("%F.%H:%M:%S")}" \
  "&to=#{@to.strftime("%F.%H:%M:%S")}" +
  @blocks.map {|b| "&block=#{b}"}.join
end