Sha256: 7778f3d8e5d6f742a2178581f029b2686c209f0b93b45912a012ab77094174c3

Contents?: true

Size: 397 Bytes

Versions: 1

Compression:

Stored size: 397 Bytes

Contents

module Subshift
  class Runner
    attr_reader :options

    delegate :source, :destination, :delay, to: :options

    def self.run!(argv)
      new(argv).run!
    end

    def initialize(argv)
      @options = Subshift::Options.new(argv)
    end

    def run!
      File.copylines(source, destination) do |line|
        line.timeline? ? line.shift_times(delay) : line
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
subshift-0.0.1.pre lib/subshift/runner.rb