Class: Gitenv::Symlink::Action
- Defined in:
- lib/gitenv/actions/symlink.rb
Instance Attribute Summary
Attributes inherited from Action
Instance Method Summary collapse
-
#initialize(context, files, options) ⇒ Action
constructor
A new instance of Action.
- #once ⇒ Object
- #overwrite(*args) ⇒ Object
Methods inherited from Action
Constructor Details
Instance Method Details
#once ⇒ Object
21 22 23 24 25 |
# File 'lib/gitenv/actions/symlink.rb', line 21 def once @options[:overwrite] = false @options[:backup] = false self end |
#overwrite(*args) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/gitenv/actions/symlink.rb', line 13 def overwrite *args = args.last.kind_of?(Hash) ? args.pop : {} overwrite = args.empty? ? true : args.shift @options[:overwrite] = overwrite @options[:backup] = [:backup] if .key?(:backup) self end |