Sha256: 2ae01f6b34b452666e5732985fe32c70ffd9977fce60bed58e6493f68d244889

Contents?: true

Size: 565 Bytes

Versions: 2

Compression:

Stored size: 565 Bytes

Contents

class DirItem
  include GitHelper

  attr_reader :path, :options
  attr_writer :managed, :modified, :candidate

  def initialize(path)
    @path = path
    @managed = false
    @modified = false
    @candidate = false
    @options = {}
  end

  def managed?
    @managed
  end

  def modified?
    @modified
  end

  def candidate?
    @candidate
  end

  def directory?
    File.directory?(@path)
  end

  def file?
    File.file?(@path)
  end

  def mtime
    File.mtime(@path)
  end

  def diff
    git_diff(@path)
  end

  def log
    git_log(@path)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
royw-git_shoes-0.0.0 lib/models/dir_item.rb
royw-git_shoes-0.0.1 lib/models/dir_item.rb