Module: Yarg::FileActions
- Included in:
- Rails
- Defined in:
- lib/yarg/file_actions.rb
Instance Attribute Summary collapse
-
#deletions ⇒ Object
List of paths to delete.
-
#scm_module ⇒ Object
Source control management module to use (default is NONE).
-
#templates ⇒ Object
List of source template paths to overwrite files in the destination project.
Instance Method Summary collapse
- #delete(relative_path) ⇒ Object
- #initialize_file_actions ⇒ Object
- #scm(scm, options = {}) ⇒ Object
- #template(absolute_path) ⇒ Object
Instance Attribute Details
#deletions ⇒ Object
List of paths to delete. (default is NONE)
6 7 8 |
# File 'lib/yarg/file_actions.rb', line 6 def deletions @deletions end |
#scm_module ⇒ Object
Source control management module to use (default is NONE)
13 14 15 |
# File 'lib/yarg/file_actions.rb', line 13 def scm_module @scm_module end |
#templates ⇒ Object
List of source template paths to overwrite files in the destination project. (default is NONE)
10 11 12 |
# File 'lib/yarg/file_actions.rb', line 10 def templates @templates end |
Instance Method Details
#delete(relative_path) ⇒ Object
20 21 22 |
# File 'lib/yarg/file_actions.rb', line 20 def delete(relative_path) self.deletions << relative_path end |
#initialize_file_actions ⇒ Object
15 16 17 18 |
# File 'lib/yarg/file_actions.rb', line 15 def initialize_file_actions self.deletions = [] self.templates = [] end |
#scm(scm, options = {}) ⇒ Object
28 29 30 |
# File 'lib/yarg/file_actions.rb', line 28 def scm(scm, = {}) self.scm_module = Scm.new(scm, ) end |
#template(absolute_path) ⇒ Object
24 25 26 |
# File 'lib/yarg/file_actions.rb', line 24 def template(absolute_path) self.templates << absolute_path end |