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
rspec-1.2.2 examples/passing/file_accessor.rb
rspec-1.1.8 examples/pure/file_accessor.rb
rspec-1.1.9 examples/pure/file_accessor.rb
rspec-1.2.0 examples/passing/file_accessor.rb
rspec-1.2.1 examples/passing/file_accessor.rb
rspec-1.2.4 examples/passing/file_accessor.rb
rspec-1.2.6 examples/passing/file_accessor.rb
rspec-1.2.5 examples/passing/file_accessor.rb
rspec-1.2.3 examples/passing/file_accessor.rb
spree-0.2.0 vendor/plugins/rspec/examples/pure/file_accessor.rb
spree-0.4.1 vendor/plugins/rspec/examples/pure/file_accessor.rb
spree-0.4.0 vendor/plugins/rspec/examples/pure/file_accessor.rb
spree-0.5.0 vendor/plugins/rspec/examples/pure/file_accessor.rb
spree-0.5.1 vendor/plugins/rspec/examples/pure/file_accessor.rb
spree-0.6.0 vendor/plugins/rspec/examples/passing/file_accessor.rb
spree-0.7.0 vendor/plugins/rspec/examples/passing/file_accessor.rb
spree-0.7.1 vendor/plugins/rspec/examples/passing/file_accessor.rb
spree-0.8.0 vendor/plugins/rspec/examples/passing/file_accessor.rb
spree-0.8.1 vendor/plugins/rspec/examples/passing/file_accessor.rb
typo-5.0.1 vendor/plugins/rspec/examples/pure/file_accessor.rb