Class: Envirobly::Git::Unstaged
- Inherits:
-
Commit
- Object
- Envirobly::Git
- Commit
- Envirobly::Git::Unstaged
- Defined in:
- lib/envirobly/git/unstaged.rb
Constant Summary
Constants inherited from Commit
Commit::EXECUTABLE_FILE_MODE, Commit::SYMLINK_FILE_MODE
Instance Attribute Summary
Attributes inherited from Commit
Instance Method Summary collapse
- #dir_exists?(path) ⇒ Boolean
- #file_content(path) ⇒ Object
- #file_exists?(path) ⇒ Boolean
-
#initialize(working_dir: Dir.getwd) ⇒ Unstaged
constructor
A new instance of Unstaged.
Methods inherited from Commit
#exists?, #message, #object_tree, #object_tree_checksum, #objects_with_checksum_at, #ref, #short_ref, #time
Methods inherited from Envirobly::Git
Constructor Details
#initialize(working_dir: Dir.getwd) ⇒ Unstaged
Returns a new instance of Unstaged.
2 3 4 |
# File 'lib/envirobly/git/unstaged.rb', line 2 def initialize(working_dir: Dir.getwd) @working_dir = working_dir end |
Instance Method Details
#dir_exists?(path) ⇒ Boolean
10 11 12 |
# File 'lib/envirobly/git/unstaged.rb', line 10 def dir_exists?(path) Dir.exist? path end |
#file_content(path) ⇒ Object
14 15 16 |
# File 'lib/envirobly/git/unstaged.rb', line 14 def file_content(path) File.read path end |
#file_exists?(path) ⇒ Boolean
6 7 8 |
# File 'lib/envirobly/git/unstaged.rb', line 6 def file_exists?(path) File.exist? path end |