Class: TailorHook::GitRepo
- Inherits:
-
Object
- Object
- TailorHook::GitRepo
- Defined in:
- lib/tailor-hook/git_repo.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ GitRepo
constructor
A new instance of GitRepo.
- #staged_ruby_files ⇒ Object
Constructor Details
#initialize(path) ⇒ GitRepo
Returns a new instance of GitRepo.
3 4 5 |
# File 'lib/tailor-hook/git_repo.rb', line 3 def initialize(path) @path = File. path end |
Instance Method Details
#staged_ruby_files ⇒ Object
7 8 9 |
# File 'lib/tailor-hook/git_repo.rb', line 7 def staged_ruby_files staged_files.find_all { |f| f.match /\.rb$/ } end |