Class: Gitlab::Git::ChangedPath
- Inherits:
-
Object
- Object
- Gitlab::Git::ChangedPath
- Defined in:
- lib/gitlab/git/changed_path.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, path:) ⇒ ChangedPath
constructor
A new instance of ChangedPath.
- #new_file? ⇒ Boolean
Constructor Details
#initialize(status:, path:) ⇒ ChangedPath
Returns a new instance of ChangedPath.
8 9 10 11 |
# File 'lib/gitlab/git/changed_path.rb', line 8 def initialize(status:, path:) @status = status @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/gitlab/git/changed_path.rb', line 6 def path @path end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/gitlab/git/changed_path.rb', line 6 def status @status end |
Instance Method Details
#new_file? ⇒ Boolean
13 14 15 |
# File 'lib/gitlab/git/changed_path.rb', line 13 def new_file? status == :ADDED end |