Class: Gemsmith::Tools::Cleaner
- Inherits:
-
Object
- Object
- Gemsmith::Tools::Cleaner
- Defined in:
- lib/gemsmith/tools/cleaner.rb
Overview
Cleans gem artifacts.
Instance Method Summary collapse
- #call(specification) ⇒ Object
-
#initialize(root_dir: Pathname.pwd) ⇒ Cleaner
constructor
A new instance of Cleaner.
Constructor Details
#initialize(root_dir: Pathname.pwd) ⇒ Cleaner
Returns a new instance of Cleaner.
14 15 16 |
# File 'lib/gemsmith/tools/cleaner.rb', line 14 def initialize root_dir: Pathname.pwd @root_dir = root_dir end |
Instance Method Details
#call(specification) ⇒ Object
18 19 20 21 22 |
# File 'lib/gemsmith/tools/cleaner.rb', line 18 def call specification root_dir.join("pkg").remove_tree root_dir.files("**/*.gem").each(&:delete) Success specification end |