Sha256: 1a4dff789c53955ebd641c28961258af39043b1db1ba2a8e274e535f6d6da423

Contents?: true

Size: 278 Bytes

Versions: 10

Compression:

Stored size: 278 Bytes

Contents

# encoding: UTF-8

module Anvil
  # Make sure that a directory exists before running the task
  class DirectoryAssure < Anvil::FileAssure
    def assured?(dir)
      super && assure_dir?(dir)
    end

    def assure_dir?(dirname)
      File.directory? dirname
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
anvil-core-0.6.0 lib/anvil/assures/directory_assure.rb
anvil-core-0.5.0 lib/anvil/assures/directory_assure.rb
anvil-core-0.4.2 lib/anvil/assures/directory_assure.rb
anvil-core-0.4.1 lib/anvil/assures/directory_assure.rb
anvil-core-0.4.0 lib/anvil/assures/directory_assure.rb
anvil-core-0.3.2 lib/anvil/assures/directory_assure.rb
anvil-core-0.3.1 lib/anvil/assures/directory_assure.rb
anvil-core-0.3.0 lib/anvil/assures/directory_assure.rb
anvil-core-0.2.0 lib/anvil/assures/directory_assure.rb
anvil-core-0.1.0 lib/anvil/assures/directory_assure.rb