Class: Gitlab::Git::ChangedPath

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/git/changed_path.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject (readonly)

Returns the value of attribute path.



6
7
8
# File 'lib/gitlab/git/changed_path.rb', line 6

def path
  @path
end

#statusObject (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

Returns:

  • (Boolean)


13
14
15
# File 'lib/gitlab/git/changed_path.rb', line 13

def new_file?
  status == :ADDED
end