Class: GitWrapper::Results::StatusPorcelain
- Inherits:
-
Object
- Object
- GitWrapper::Results::StatusPorcelain
- Defined in:
- lib/git_wrapper/results/status_porcelain.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
-
#original_file_name ⇒ Object
readonly
Returns the value of attribute original_file_name.
-
#staged_for_commit ⇒ Object
readonly
Returns the value of attribute staged_for_commit.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file_name, original_file_name, status, staged_for_commit) ⇒ StatusPorcelain
constructor
A new instance of StatusPorcelain.
Constructor Details
#initialize(file_name, original_file_name, status, staged_for_commit) ⇒ StatusPorcelain
Returns a new instance of StatusPorcelain.
9 10 11 12 13 14 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 9 def initialize(file_name, original_file_name, status, staged_for_commit) @file_name = file_name @original_file_name = original_file_name @status = status @staged_for_commit = staged_for_commit end |
Instance Attribute Details
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
4 5 6 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 4 def file_name @file_name end |
#original_file_name ⇒ Object (readonly)
Returns the value of attribute original_file_name.
5 6 7 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 5 def original_file_name @original_file_name end |
#staged_for_commit ⇒ Object (readonly)
Returns the value of attribute staged_for_commit.
7 8 9 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 7 def staged_for_commit @staged_for_commit end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 6 def status @status end |
Class Method Details
.parse(text) ⇒ Object
16 17 18 |
# File 'lib/git_wrapper/results/status_porcelain.rb', line 16 def self.parse(text) StatusPorcelain.new parse_file_name(text), parse_original_file_name(text), parse_status(text), parse_staged_for_commit(text) end |