Class: Approvals::Reporters::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/approvals/reporters/reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&launcher) ⇒ Reporter

Returns a new instance of Reporter


7
8
9
# File 'lib/approvals/reporters/reporter.rb', line 7

def initialize(&launcher)
  @launcher = launcher || default_launcher
end

Instance Attribute Details

#launcherObject (readonly)

Returns the value of attribute launcher


5
6
7
# File 'lib/approvals/reporters/reporter.rb', line 5

def launcher
  @launcher
end

Instance Method Details

#approved_when_reported?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'lib/approvals/reporters/reporter.rb', line 15

def approved_when_reported?
  false
end

#default_launcherObject


19
20
21
# File 'lib/approvals/reporters/reporter.rb', line 19

def default_launcher
  Launcher.opendiff
end

#report(received, approved) ⇒ Object


11
12
13
# File 'lib/approvals/reporters/reporter.rb', line 11

def report(received, approved)
  launch(received, approved)
end