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.



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

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

Instance Attribute Details

#adapterObject

Returns the value of attribute adapter.



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

def adapter
  @adapter
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#messageObject



17
18
19
20
# File 'lib/test_notifier/stats.rb', line 17

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

#statusObject



12
13
14
15
# File 'lib/test_notifier/stats.rb', line 12

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