lib/chef/provider/package.rb
# TIP: less error prone to simply always call resolved_source_array, even if you
# don't think that you need to.
#
# @return [Array] new_resource.source as an array
less error prone to simply always call resolved_source_array, even if you
don't think that you need to.
less error prone to simply always call resolved_source_array even if you don ' t think that you need to .
def source_array
        @source_array ||=
          if new_resource.source.nil?
            package_name_array.map { nil }
          else
            [ new_resource.source ].flatten
          end
      end
def source_array @source_array ||= if new_resource . source . nil? package_name_array . map { nil } else [ new_resource . source ] . flatten end end
TIP: less error prone to simply always call resolved_source_array, even if you
don't think that you need to.
TIP : less error prone to simply always call resolved_source_array even if you don ' t think that you need to .
new_resource.source as an array
new_resource . source as an array
Array