Class: Gill::Remove
- Inherits:
-
Object
- Object
- Gill::Remove
- Defined in:
- lib/gill/remove.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#category_path ⇒ Object
readonly
Returns the value of attribute category_path.
-
#repo_name ⇒ Object
readonly
Returns the value of attribute repo_name.
-
#repo_path ⇒ Object
readonly
Returns the value of attribute repo_path.
Instance Method Summary collapse
-
#initialize(args) ⇒ Remove
constructor
Initialize New Remove Object.
-
#remove_repo(force = false) ⇒ Object
Remove Repo.
Methods included from Helper
#ask, #basename, #blue, #folder_empty?, #green, #parent, #red
Constructor Details
#initialize(args) ⇒ Remove
Initialize New Remove Object
14 15 16 17 18 19 20 |
# File 'lib/gill/remove.rb', line 14 def initialize(args) @args = args.split(/\#/) @category, @repo_name = @args.first, @args.last @category_path = File.join(Gill.config.source_path, @category) @repo_path = File.join(@category_path, @repo_name) @parent_folders = [] end |
Instance Attribute Details
#category ⇒ Object (readonly)
Returns the value of attribute category.
7 8 9 |
# File 'lib/gill/remove.rb', line 7 def category @category end |
#category_path ⇒ Object (readonly)
Returns the value of attribute category_path.
7 8 9 |
# File 'lib/gill/remove.rb', line 7 def category_path @category_path end |
#repo_name ⇒ Object (readonly)
Returns the value of attribute repo_name.
7 8 9 |
# File 'lib/gill/remove.rb', line 7 def repo_name @repo_name end |
#repo_path ⇒ Object (readonly)
Returns the value of attribute repo_path.
7 8 9 |
# File 'lib/gill/remove.rb', line 7 def repo_path @repo_path end |
Instance Method Details
#remove_repo(force = false) ⇒ Object
Remove Repo
27 28 29 |
# File 'lib/gill/remove.rb', line 27 def remove_repo(force=false) remove_repository_files if category_exists? && repo_exists? end |