Method: Chef::DSL::IncludeAttribute#parse_attribute_file_spec
- Defined in:
- lib/chef/dsl/include_attribute.rb
#parse_attribute_file_spec(file_spec) ⇒ Object
Takes a attribute file specification, like "apache2" or "mysql::server" and converts it to a 2 element array of [cookbook_name, attribute_file_name]
47 48 49 50 51 52 53 |
# File 'lib/chef/dsl/include_attribute.rb', line 47 def parse_attribute_file_spec(file_spec) if match = file_spec.match(/(.+?)::(.+)/) [match[1], match[2]] else [file_spec, "default"] end end |