Sha256: 1e9778c78046fd2b38c5f7490c7776faf50ae2bf00da478cf7c7369e462db855

Contents?: true

Size: 412 Bytes

Versions: 2

Compression:

Stored size: 412 Bytes

Contents

require 'guard/foodcritic'

module Guard
  class Foodcritic
    class Runner
      attr_reader :options

      def initialize(options = {})
        @options = {
          cli: '--epic-fail any'
        }.merge(options)
      end

      def command(paths)
        ['foodcritic', @options[:cli], paths].flatten(1).join(' ')
      end

      def run(paths)
        system command(paths)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
guard-foodcritic-3.0.0 lib/guard/foodcritic/runner.rb
guard-foodcritic-2.1.0 lib/guard/foodcritic/runner.rb