Class: Ing::Files::Directory
- Inherits:
-
EmptyDirectory
- Object
- EmptyDirectory
- Ing::Files::Directory
- Defined in:
- lib/ing/actions/directory.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from EmptyDirectory
#base, #config, #destination, #given_destination, #relative_destination
Instance Method Summary collapse
-
#initialize(base, source, destination = nil, config = {}, &block) ⇒ Directory
constructor
A new instance of Directory.
- #invoke! ⇒ Object
- #revoke! ⇒ Object
Methods inherited from EmptyDirectory
Constructor Details
#initialize(base, source, destination = nil, config = {}, &block) ⇒ Directory
Returns a new instance of Directory.
56 57 58 59 60 |
# File 'lib/ing/actions/directory.rb', line 56 def initialize(base, source, destination=nil, config={}, &block) @source = File.(base.find_in_source_paths(source.to_s)) @block = block super(base, destination, { :recursive => true }.merge(config)) end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
54 55 56 |
# File 'lib/ing/actions/directory.rb', line 54 def source @source end |
Instance Method Details
#invoke! ⇒ Object
62 63 64 65 |
# File 'lib/ing/actions/directory.rb', line 62 def invoke! base.empty_directory given_destination, config execute! end |
#revoke! ⇒ Object
67 68 69 |
# File 'lib/ing/actions/directory.rb', line 67 def revoke! execute! end |