Class: Kropka::File
- Inherits:
-
Object
- Object
- Kropka::File
- Defined in:
- lib/kropka/file.rb
Instance Method Summary collapse
- #copy! ⇒ Object
-
#initialize(&block) ⇒ File
constructor
A new instance of File.
Constructor Details
#initialize(&block) ⇒ File
Returns a new instance of File.
5 6 7 |
# File 'lib/kropka/file.rb', line 5 def initialize(&block) instance_eval(&block) if block_given? end |
Instance Method Details
#copy! ⇒ Object
9 10 11 12 13 |
# File 'lib/kropka/file.rb', line 9 def copy! FileUtils.cp(@source, @target) puts ["Copied".color(:green), @source.color(:cyan), "to".color(:green), @target.color(:cyan)].join(" ") end |