Class: TestNotifier::Stats

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(adapter, options = {}) ⇒ Stats

Returns a new instance of Stats.


5
6
7
8
# File 'lib/test_notifier/stats.rb', line 5

def initialize(adapter, options = {})
  @adapter = adapter
  @options = normalize(options)
end

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter


3
4
5
# File 'lib/test_notifier/stats.rb', line 3

def adapter
  @adapter
end

#optionsObject

Returns the value of attribute options


3
4
5
# File 'lib/test_notifier/stats.rb', line 3

def options
  @options
end

Instance Method Details

#messageObject


15
16
17
18
# File 'lib/test_notifier/stats.rb', line 15

def message
  @options = normalize(options)
  send("message_for_#{adapter}")
end

#statusObject


10
11
12
13
# File 'lib/test_notifier/stats.rb', line 10

def status
  @options = normalize(options)
  send("status_for_#{adapter}")
end