Method: Thor::Actions#create_link
- Defined in:
- lib/thor/actions/create_link.rb
#create_link(destination, *args) ⇒ Object Also known as: add_link
Create a new file relative to the destination root from the given source.
Parameters
- destination<String>
-
the relative path to the destination root.
- source<String|NilClass>
-
the relative path to the source root.
- config<Hash>
-
give :verbose => false to not log the status.
-
give :symbolic => false for hard link.
Examples
create_link "config/apache.conf", "/etc/apache.conf"
17 18 19 20 21 |
# File 'lib/thor/actions/create_link.rb', line 17 def create_link(destination, *args) config = args.last.is_a?(Hash) ? args.pop : {} source = args.first action CreateLink.new(self, destination, source, config) end |