Class: GitCleanser::SmartThing
- Inherits:
-
Object
- Object
- GitCleanser::SmartThing
- Defined in:
- lib/git_cleanser/smart_thing.rb
Instance Method Summary collapse
- #generated_but_not_ignored ⇒ Object
- #ignored_but_not_generated ⇒ Object
- #ignored_but_tracked ⇒ Object
-
#initialize(config) ⇒ SmartThing
constructor
A new instance of SmartThing.
- #uncompiled ⇒ Object
Constructor Details
#initialize(config) ⇒ SmartThing
Returns a new instance of SmartThing.
3 4 5 6 7 8 9 |
# File 'lib/git_cleanser/smart_thing.rb', line 3 def initialize(config) @config = config @compiled_files = sh(@config['compiled_files_command']).split @ignored_and_untracked_files = git_ls_files(:ignored, :other) @ignored_but_tracked_files = git_ls_files(:ignored) @all_files = Dir['**/*'] end |
Instance Method Details
#generated_but_not_ignored ⇒ Object
11 12 13 |
# File 'lib/git_cleanser/smart_thing.rb', line 11 def generated_but_not_ignored @compiled_files - @ignored_and_untracked_files end |
#ignored_but_not_generated ⇒ Object
15 16 17 |
# File 'lib/git_cleanser/smart_thing.rb', line 15 def ignored_but_not_generated @ignored_and_untracked_files - @compiled_files end |
#ignored_but_tracked ⇒ Object
19 20 21 |
# File 'lib/git_cleanser/smart_thing.rb', line 19 def ignored_but_tracked @ignored_but_tracked_files end |
#uncompiled ⇒ Object
23 24 25 |
# File 'lib/git_cleanser/smart_thing.rb', line 23 def uncompiled @all_files - @compiled_files end |