Class: GitShizzle::Git::File
- Inherits:
-
Object
- Object
- GitShizzle::Git::File
- Defined in:
- lib/git_shizzle/git/file.rb
Instance Attribute Summary collapse
-
#index_status ⇒ Object
readonly
Returns the value of attribute index_status.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#status_line ⇒ Object
readonly
Returns the value of attribute status_line.
-
#work_tree_status ⇒ Object
readonly
Returns the value of attribute work_tree_status.
Instance Method Summary collapse
-
#initialize(params) ⇒ File
constructor
A new instance of File.
- #inspect ⇒ Object
Constructor Details
#initialize(params) ⇒ File
Returns a new instance of File.
7 8 9 10 11 12 |
# File 'lib/git_shizzle/git/file.rb', line 7 def initialize(params) @status_line = params[:status_line] @path = params[:path] @index_status = map params[:status][0] @work_tree_status = map params[:status][1] end |
Instance Attribute Details
#index_status ⇒ Object (readonly)
Returns the value of attribute index_status.
5 6 7 |
# File 'lib/git_shizzle/git/file.rb', line 5 def index_status @index_status end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/git_shizzle/git/file.rb', line 5 def path @path end |
#status_line ⇒ Object (readonly)
Returns the value of attribute status_line.
5 6 7 |
# File 'lib/git_shizzle/git/file.rb', line 5 def status_line @status_line end |
#work_tree_status ⇒ Object (readonly)
Returns the value of attribute work_tree_status.
5 6 7 |
# File 'lib/git_shizzle/git/file.rb', line 5 def work_tree_status @work_tree_status end |
Instance Method Details
#inspect ⇒ Object
14 15 16 |
# File 'lib/git_shizzle/git/file.rb', line 14 def inspect "Path: #{path}: work tree #{@work_tree_status}, index #{@index_status}" end |