Class: Oncall::Core::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/oncall/core/group.rb

Instance Method Summary collapse

Constructor Details

#initializeGroup



4
5
6
# File 'lib/oncall/core/group.rb', line 4

def initialize
  @reporter = Oncall::Core.reporter
end

Instance Method Details

#describe(&block) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/oncall/core/group.rb', line 8

def describe(&block)
  if block_given?
    scenario = Oncall::Core::Scenario.new
    scenario.instance_exec &block
  else
    @reporter.report_empty_group
  end
end