Class Grit::Status::StatusFile
In: lib/grit/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/grit/status.rb, line 64
64:       def initialize(base, hash)
65:         @base = base
66:         @path = hash[:path]
67:         @type = hash[:type]
68:         @stage = hash[:stage]
69:         @mode_index = hash[:mode_index]
70:         @mode_repo = hash[:mode_repo]
71:         @sha_index = hash[:sha_index]
72:         @sha_repo = hash[:sha_repo]
73:         @untracked = hash[:untracked]
74:       end

Public Instance methods

[Source]

    # File lib/grit/status.rb, line 76
76:       def blob(type = :index)
77:         if type == :repo
78:           @base.object(@sha_repo)
79:         else
80:           @base.object(@sha_index) rescue @base.object(@sha_repo)
81:         end
82:       end

[Validate]