Class: Octodown::FileChooser::MarkdownFileList::Git
- Inherits:
-
Object
- Object
- Octodown::FileChooser::MarkdownFileList::Git
- Defined in:
- lib/octodown/support/file_chooser.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
23 24 25 26 |
# File 'lib/octodown/support/file_chooser.rb', line 23 def call ext_args = EXTENSIONS.map { |ext| "**/*.#{ext} *.#{ext}" }.join(' ') `git ls-files --cached --others -z #{ext_args}`.split("\x0").uniq end |
#runnable? ⇒ Boolean
28 29 30 31 32 33 |
# File 'lib/octodown/support/file_chooser.rb', line 28 def runnable? `git rev-parse --is-inside-work-tree` $CHILD_STATUS.success? rescue StandardError false end |