Sha256: 9274da1d604423661d99deb5387fbba35a7ef700112f34f00f89b95970c9c1bb

Contents?: true

Size: 431 Bytes

Versions: 110

Compression:

Stored size: 431 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'
class FileAccessor
  def open_and_handle_with(pathname, processor)
    pathname.open do |io|
      processor.process(io)
    end
  end
end

if __FILE__ == $0
  require File.dirname(__FILE__) + '/io_processor'
  require 'pathname'
  
  accessor = FileAccessor.new
  io_processor = IoProcessor.new
  file = Pathname.new ARGV[0]

  accessor.open_and_handle_with(file, io_processor)
end

Version data entries

110 entries across 110 versions & 13 rubygems

Version Path
typo-5.0.2 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.0.3.98.1 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.0.3.98 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.0 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.1.2 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.1.1 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.1.3 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.1.98 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.1 vendor/plugins/rspec/examples/pure/file_accessor.rb
typo-5.2 vendor/plugins/rspec/examples/pure/file_accessor.rb