Class: Dashing::Newrelic::Scheduler

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
app/jobs/dashing/newrelic/scheduler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frequence) ⇒ Scheduler

Returns a new instance of Scheduler.



10
11
12
13
14
15
# File 'app/jobs/dashing/newrelic/scheduler.rb', line 10

def initialize(frequence)
  @config               = Dashing::Newrelic.config
  @frequence            = frequence
  ::NewRelicApi.api_key = api_key
  super(config)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'app/jobs/dashing/newrelic/scheduler.rb', line 8

def config
  @config
end

#frequenceObject (readonly)

Returns the value of attribute frequence.



8
9
10
# File 'app/jobs/dashing/newrelic/scheduler.rb', line 8

def frequence
  @frequence
end

Instance Method Details

#callObject



17
18
19
# File 'app/jobs/dashing/newrelic/scheduler.rb', line 17

def call
  schedule if valid?
end