Class: Wright::Resource::Directory
- Inherits:
-
Wright::Resource
- Object
- Wright::Resource
- Wright::Resource::Directory
- Extended by:
- Forwardable
- Defined in:
- lib/wright/resource/directory.rb
Overview
Directory resource, represents a directory.
Instance Attribute Summary collapse
-
#group ⇒ String, Integer
The directory’s intended group.
-
#mode ⇒ String, Integer
The directory’s intended mode.
-
#owner ⇒ String, Integer
The directory’s intended owner.
Attributes inherited from Wright::Resource
#action, #ignore_failure, #name, #resource_name
Instance Method Summary collapse
-
#create ⇒ Bool
Creates or updates the directory.
-
#initialize(name) ⇒ Directory
constructor
Initializes a Directory.
-
#remove ⇒ Bool
Removes the directory.
Methods inherited from Wright::Resource
Constructor Details
Instance Attribute Details
#group ⇒ String, Integer
Returns the directory’s intended group.
41 |
# File 'lib/wright/resource/directory.rb', line 41 def_delegator :@owner, :group |
#mode ⇒ String, Integer
Returns the directory’s intended mode.
28 29 30 |
# File 'lib/wright/resource/directory.rb', line 28 def mode @mode end |
#owner ⇒ String, Integer
Returns the directory’s intended owner.
34 |
# File 'lib/wright/resource/directory.rb', line 34 def_delegator :@owner, :user_and_group=, :owner= |
Instance Method Details
#create ⇒ Bool
Creates or updates the directory.
48 49 50 51 52 |
# File 'lib/wright/resource/directory.rb', line 48 def create might_update_resource do @provider.create end end |
#remove ⇒ Bool
Removes the directory.
58 59 60 61 62 |
# File 'lib/wright/resource/directory.rb', line 58 def remove might_update_resource do @provider.remove end end |