Class: Wright::Provider

Inherits:
Object
  • Object
show all
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.

Direct Known Subclasses

Directory, File, Package, Symlink

Defined Under Namespace

Classes: Directory, File, Package, Symlink

Constant Summary collapse

PROVIDER_DIR =

Public: Wright standard provider directory.

File.expand_path('provider', File.dirname(__FILE__))

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Provider

Public: Initialize a Provider.

resource - The resource used by the provider, typically a

Wright::Resource.


15
16
17
18
# File 'lib/wright/provider.rb', line 15

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.



24
25
26
27
28
# File 'lib/wright/provider.rb', line 24

def updated?
  updated = @updated
  @updated = false
  updated
end