Sha256: 8d568706f8830d8d03567b9835e4bf1d4f0cb671813e7963e26364c7028c76b4

Contents?: true

Size: 512 Bytes

Versions: 24

Compression:

Stored size: 512 Bytes

Contents

module Approvals
  module Reporters
    class Reporter

      attr_reader :launcher

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

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

      def approved_when_reported?
        false
      end

      def default_launcher
        Launcher.opendiff
      end

      protected

      def launch(received, approved)
        `#{launcher.call(received, approved)}`
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
approvals-0.0.26 lib/approvals/reporters/reporter.rb
approvals-0.0.25 lib/approvals/reporters/reporter.rb
approvals-0.0.24 lib/approvals/reporters/reporter.rb
br-approvals-0.0.22 lib/approvals/reporters/reporter.rb
approvals-0.0.22 lib/approvals/reporters/reporter.rb
approvals-0.0.21 lib/approvals/reporters/reporter.rb
approvals-0.0.20 lib/approvals/reporters/reporter.rb
approvals-0.0.19 lib/approvals/reporters/reporter.rb
approvals-0.0.18 lib/approvals/reporters/reporter.rb
approvals-0.0.17 lib/approvals/reporters/reporter.rb
approvals-0.0.16 lib/approvals/reporters/reporter.rb
approvals-0.0.15 lib/approvals/reporters/reporter.rb
approvals-0.0.14 lib/approvals/reporters/reporter.rb
approvals-0.0.13 lib/approvals/reporters/reporter.rb
approvals-0.0.12 lib/approvals/reporters/reporter.rb
approvals-0.0.11 lib/approvals/reporters/reporter.rb
approvals-0.0.10 lib/approvals/reporters/reporter.rb
approvals-0.0.9 lib/approvals/reporters/reporter.rb
approvals-0.0.8 lib/approvals/reporters/reporter.rb
approvals-0.0.7 lib/approvals/reporters/reporter.rb