Class: Maid::App
- Inherits:
-
Thor
- Object
- Thor
- Maid::App
- Defined in:
- lib/maid/app.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.sample_rules_path ⇒ Object
10 11 12 |
# File 'lib/maid/app.rb', line 10 def self.sample_rules_path File.join(File.dirname(Maid::Maid::DEFAULTS[:rules_path]), 'rules.sample.rb') end |
Instance Method Details
#clean ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/maid/app.rb', line 18 def clean maid = Maid::Maid.new(()) unless .silent? || .noop? say "Logging actions to #{maid.log_device.inspect}" end maid.clean end |
#sample ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'lib/maid/app.rb', line 32 def sample path = self.class.sample_rules_path FileUtils.mkdir_p(File.dirname(path)) File.open(path, 'w').puts(File.read(File.join(File.dirname(__FILE__), 'rules.sample.rb'))) say "Sample rules created at #{path.inspect}", :green end |
#version ⇒ Object
27 28 29 |
# File 'lib/maid/app.rb', line 27 def version say Maid::VERSION end |