Sha256: 1992608b426f9487a02f3c8fb72d2f5a532706bfa82dafa723b73eba849a1f84

Contents?: true

Size: 503 Bytes

Versions: 4

Compression:

Stored size: 503 Bytes

Contents

module Ahnnotate
  module Command
    def self.included(other)
      other.class_eval do
        attr_writer :vfs
      end
    end

    def initialize(root, options, config)
      @root = root
      @options = options
      @config = config
    end

    def vfs
      @vfs ||= Vfs.new(vfs_driver)
    end

    private

    def vfs_driver
      if @options.fix?
        VfsDriver::Filesystem.new(root: @root)
      else
        VfsDriver::ReadOnlyFilesystem.new(root: @root)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ahnnotate-0.5.1 lib/ahnnotate/command.rb
ahnnotate-0.5.0 lib/ahnnotate/command.rb
ahnnotate-0.4.0 lib/ahnnotate/command.rb
ahnnotate-0.3.0 lib/ahnnotate/command.rb