Class: Wright::Provider
- Inherits:
-
Object
- Object
- Wright::Provider
- Defined in:
- lib/wright/provider.rb,
lib/wright/provider/file.rb,
lib/wright/provider/package.rb,
lib/wright/provider/symlink.rb,
lib/wright/provider/directory.rb,
lib/wright/provider/package/apt.rb
Overview
Public: Provider class.
Defined Under Namespace
Classes: Directory, File, Package, Symlink
Constant Summary collapse
- PROVIDER_DIR =
Public: Wright standard provider directory.
File.('provider', File.dirname(__FILE__))
Instance Method Summary collapse
-
#initialize(resource) ⇒ Provider
constructor
Public: Initialize a Provider.
-
#updated? ⇒ Boolean
Public: Checks if the provider was updated since the last call to updated?.
Constructor Details
#initialize(resource) ⇒ Provider
Public: Initialize a Provider.
resource - The resource used by the provider, typically a
Wright::Resource.
16 17 18 19 |
# File 'lib/wright/provider.rb', line 16 def initialize(resource) @resource = resource @updated = false end |
Instance Method Details
#updated? ⇒ Boolean
Public: Checks if the provider was updated since the last call to updated?.
Returns true if the provider was updated and false otherwise.
25 26 27 28 29 |
# File 'lib/wright/provider.rb', line 25 def updated? updated = @updated @updated = false updated end |