Class: GitCli::Delta::VCSItem
- Inherits:
-
Object
- Object
- GitCli::Delta::VCSItem
- Defined in:
- lib/git_cli/delta.rb
Direct Known Subclasses
ConflictedDir, ConflictedFile, DeletedDir, DeletedFile, ModifiedDir, ModifiedFile, NewDir, NewFile, StagedDir, StagedFile
Instance Attribute Summary collapse
-
#full ⇒ Object
readonly
Returns the value of attribute full.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#<=>(val) ⇒ Object
support sort.
- #==(val) ⇒ Object
-
#initialize(type, path, full) ⇒ VCSItem
constructor
A new instance of VCSItem.
Constructor Details
#initialize(type, path, full) ⇒ VCSItem
Returns a new instance of VCSItem.
25 26 27 28 29 |
# File 'lib/git_cli/delta.rb', line 25 def initialize(type, path, full) @type = type @path = path @full = full end |
Instance Attribute Details
#full ⇒ Object (readonly)
Returns the value of attribute full.
24 25 26 |
# File 'lib/git_cli/delta.rb', line 24 def full @full end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
24 25 26 |
# File 'lib/git_cli/delta.rb', line 24 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
24 25 26 |
# File 'lib/git_cli/delta.rb', line 24 def type @type end |
Instance Method Details
#<=>(val) ⇒ Object
support sort
32 33 34 35 36 37 38 |
# File 'lib/git_cli/delta.rb', line 32 def <=>(val) if val.is_a?(VCSItem) @path <=> val.path else false end end |
#==(val) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/git_cli/delta.rb', line 40 def ==(val) if val.is_a?(VCSItem) @path == val.path else false end end |