Class Git::Status::StatusFile
In: lib/git/status.rb
Parent: Object

Methods

blob   new  

Attributes

mode_index  [RW] 
mode_repo  [RW] 
path  [RW] 
sha_index  [RW] 
sha_repo  [RW] 
stage  [RW] 
type  [RW] 
untracked  [RW] 

Public Class methods

[Source]

# File lib/git/status.rb, line 64
      def initialize(base, hash)
        @base = base
        @path = hash[:path]
        @type = hash[:type]
        @stage = hash[:stage]
        @mode_index = hash[:mode_index]
        @mode_repo = hash[:mode_repo]
        @sha_index = hash[:sha_index]
        @sha_repo = hash[:sha_repo]
        @untracked = hash[:untracked]
      end

Public Instance methods

[Source]

# File lib/git/status.rb, line 76
      def blob(type = :index)
        if type == :repo
          @base.object(@sha_repo)
        else
          @base.object(@sha_index) rescue @base.object(@sha_repo)
        end
      end

[Validate]