diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-09 18:51:38 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-04-09 18:51:38 -0700 |
commit | b1cb0df3566bcd0832831e5317505d7034eba0ea (patch) | |
tree | 943811fc2ccc9353a34c332be2ae70676aa08cfa /lib/chef/provider.rb | |
parent | 3443d63a8d9a699c48b59a7d369e4c7036ef7d1e (diff) | |
download | chef-b1cb0df3566bcd0832831e5317505d7034eba0ea.tar.gz |
use start_with?lcg/resource-partials
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider.rb')
-rw-r--r-- | lib/chef/provider.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb index 973d76325e..40bd5a48a1 100644 --- a/lib/chef/provider.rb +++ b/lib/chef/provider.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Christopher Walters (<cw@chef.io>) -# Copyright:: Copyright 2008-2016, 2009-2020, Chef Software Inc. +# Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -91,7 +91,7 @@ class Chef def self.use(partial) dirname = ::File.dirname(partial) basename = ::File.basename(partial, ".rb") - basename = basename[1..-1] if basename[0] == "_" + basename = basename[1..-1] if basename.start_with?("_") class_eval IO.read(::File.expand_path("#{dirname}/_#{basename}.rb", ::File.dirname(caller_locations.first.absolute_path))) end |