Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/berkshelf/api/core_ext/pathname.rb
Instance Method Summary collapse
-
#cookbook? ⇒ Boolean
(also: #chef_cookbook?)
Returns true or false if the path contains a “metadata.json” or a “metadata.rb” file.
Instance Method Details
#cookbook? ⇒ Boolean Also known as: chef_cookbook?
Returns true or false if the path contains a “metadata.json” or a “metadata.rb” file.
5 6 7 |
# File 'lib/berkshelf/api/core_ext/pathname.rb', line 5 def cookbook? join("metadata.json").exist? || join("metadata.rb").exist? end |