Parent

Class/Module Index [+]

Quicksearch

Chef::Cookbook::Chefignore

Attributes

ignores[R]

Public Class Methods

new(ignore_file_or_repo) click to toggle source
# File lib/chef/cookbook/chefignore.rb, line 27
def initialize(ignore_file_or_repo)
  @ignore_file = find_ignore_file(ignore_file_or_repo)
  @ignores = parse_ignore_file
end

Public Instance Methods

ignored?(file_name) click to toggle source
# File lib/chef/cookbook/chefignore.rb, line 38
def ignored?(file_name)
  @ignores.any? {|glob| File.fnmatch?(glob, file_name)}
end
remove_ignores_from(file_list) click to toggle source
# File lib/chef/cookbook/chefignore.rb, line 32
def remove_ignores_from(file_list)
  Array(file_list).inject([]) do |unignored, file|
    ignored?(file) ? unignored : unignored << file
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.