Sha256: 8e3747efd89b13d4b0f9933d29e0c1cd46b4adef34943789b3faad34b1392c76

Contents?: true

Size: 366 Bytes

Versions: 3

Compression:

Stored size: 366 Bytes

Contents

module Shhh
  module App
    module Output
      class File
        attr_accessor :cli

        def initialize(cli)
          self.cli = cli
        end

        def opts
          cli.opts
        end

        def output_proc
          ->(data) {
            ::File.open(opts[:output], 'w') { |f| f.write(data) }
          }
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
shhh-1.4.1 lib/shhh/app/output/file.rb
shhh-1.4.0 lib/shhh/app/output/file.rb
shhh-1.3.0 lib/shhh/app/output/file.rb