Class: Wright::Resource::Directory
- Inherits:
-
Wright::Resource
- Object
- Wright::Resource
- Wright::Resource::Directory
- Defined in:
- lib/wright/resource/directory.rb
Overview
Directory resource, represents a directory.
Instance Attribute Summary collapse
-
#group ⇒ String
The directory’s group.
-
#mode ⇒ String, Integer
The directory’s mode.
-
#owner ⇒ String
The directory’s 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
#initialize(name) ⇒ Directory
Initializes a Directory.
15 16 17 18 19 20 21 |
# File 'lib/wright/resource/directory.rb', line 15 def initialize(name) super @mode = nil @owner = nil @group = nil @action = :create end |
Instance Attribute Details
#group ⇒ String
Returns the directory’s group.
38 39 40 |
# File 'lib/wright/resource/directory.rb', line 38 def group @group end |
#mode ⇒ String, Integer
Returns the directory’s mode.
24 25 26 |
# File 'lib/wright/resource/directory.rb', line 24 def mode @mode end |
#owner ⇒ String
Returns the directory’s owner.
27 28 29 |
# File 'lib/wright/resource/directory.rb', line 27 def owner @owner end |
Instance Method Details
#create ⇒ Bool
Creates or updates the directory.
49 50 51 52 53 |
# File 'lib/wright/resource/directory.rb', line 49 def create might_update_resource do @provider.create end end |
#remove ⇒ Bool
Removes the directory.
59 60 61 62 63 |
# File 'lib/wright/resource/directory.rb', line 59 def remove might_update_resource do @provider.remove end end |