Class: Avm::Tools::Runner::Files::Format
- Inherits:
-
Object
- Object
- Avm::Tools::Runner::Files::Format
- Defined in:
- lib/avm/tools/runner/files/format.rb
Instance Method Summary collapse
- #dirty_files ⇒ Object
- #formatter_options ⇒ Object
- #run ⇒ Object
- #scm ⇒ Object
- #source_paths ⇒ Object
Instance Method Details
#dirty_files ⇒ Object
35 36 37 |
# File 'lib/avm/tools/runner/files/format.rb', line 35 def dirty_files scm.changed_files.map(&:absolute_path).select(&:exist?).map(&:to_path) end |
#formatter_options ⇒ Object
25 26 27 28 29 |
# File 'lib/avm/tools/runner/files/format.rb', line 25 def { ::Avm::FileFormats::SearchFormatter::OPTION_APPLY => parsed.apply?, ::Avm::FileFormats::SearchFormatter::OPTION_RECURSIVE => !parsed.no_recursive?, ::Avm::FileFormats::SearchFormatter::OPTION_VERBOSE => !parsed.quiet? } end |
#run ⇒ Object
21 22 23 |
# File 'lib/avm/tools/runner/files/format.rb', line 21 def run ::Avm::FileFormats::SearchFormatter.new(source_paths, ).run end |
#scm ⇒ Object
31 32 33 |
# File 'lib/avm/tools/runner/files/format.rb', line 31 def scm @scm ||= ::Avm::Registry.scms.detect('.') end |
#source_paths ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/avm/tools/runner/files/format.rb', line 39 def source_paths if parsed.dirty? parsed.paths + dirty_files else parsed.paths.if_present(%w[.]) end end |