Class: RailVerdict::Git::ChangedFile
- Inherits:
-
Object
- Object
- RailVerdict::Git::ChangedFile
- Defined in:
- lib/rail_verdict/git/context.rb
Instance Attribute Summary collapse
-
#binary ⇒ Object
Returns the value of attribute binary.
-
#new_path ⇒ Object
readonly
Returns the value of attribute new_path.
-
#old_path ⇒ Object
readonly
Returns the value of attribute old_path.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, path:, old_path:, new_path:, score:, binary: false) ⇒ ChangedFile
constructor
A new instance of ChangedFile.
- #to_h ⇒ Object
Constructor Details
#initialize(status:, path:, old_path:, new_path:, score:, binary: false) ⇒ ChangedFile
Returns a new instance of ChangedFile.
12 13 14 15 16 17 18 19 20 |
# File 'lib/rail_verdict/git/context.rb', line 12 def initialize(status:, path:, old_path:, new_path:, score:, binary: false) @status = status @path = path @old_path = old_path @new_path = new_path @score = score @binary = binary freeze end |
Instance Attribute Details
#binary ⇒ Object
Returns the value of attribute binary.
10 11 12 |
# File 'lib/rail_verdict/git/context.rb', line 10 def binary @binary end |
#new_path ⇒ Object (readonly)
Returns the value of attribute new_path.
9 10 11 |
# File 'lib/rail_verdict/git/context.rb', line 9 def new_path @new_path end |
#old_path ⇒ Object (readonly)
Returns the value of attribute old_path.
9 10 11 |
# File 'lib/rail_verdict/git/context.rb', line 9 def old_path @old_path end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/rail_verdict/git/context.rb', line 9 def path @path end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
9 10 11 |
# File 'lib/rail_verdict/git/context.rb', line 9 def score @score end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/rail_verdict/git/context.rb', line 9 def status @status end |
Instance Method Details
#to_h ⇒ Object
22 23 24 |
# File 'lib/rail_verdict/git/context.rb', line 22 def to_h { "status" => status.to_s, "path" => path, "old_path" => old_path, "new_path" => new_path, "score" => score, "binary" => binary } end |