Class: Trifle::Stats::Operations::Status::Beam

Inherits:
Object
  • Object
show all
Defined in:
lib/trifle/stats/operations/status/beam.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**keywords) ⇒ Beam



10
11
12
13
14
15
# File 'lib/trifle/stats/operations/status/beam.rb', line 10

def initialize(**keywords)
  @key = keywords.fetch(:key)
  @at = keywords.fetch(:at)
  @values = keywords.fetch(:values)
  @config = keywords[:config]
end

Instance Attribute Details

#atObject (readonly)

Returns the value of attribute at.



8
9
10
# File 'lib/trifle/stats/operations/status/beam.rb', line 8

def at
  @at
end

#keyObject (readonly)

Returns the value of attribute key.



8
9
10
# File 'lib/trifle/stats/operations/status/beam.rb', line 8

def key
  @key
end

#valuesObject (readonly)

Returns the value of attribute values.



8
9
10
# File 'lib/trifle/stats/operations/status/beam.rb', line 8

def values
  @values
end

Instance Method Details

#configObject



17
18
19
# File 'lib/trifle/stats/operations/status/beam.rb', line 17

def config
  @config || Trifle::Stats.default
end

#performObject



21
22
23
24
25
26
# File 'lib/trifle/stats/operations/status/beam.rb', line 21

def perform
  config.driver.ping(
    key: Nocturnal::Key.new(key: key, at: at),
    **values
  )
end