lib/pdk/generate/puppet_class.rb
# Calculates the path to the file where the tests for the new class will
# be written.
#
# @return [String] the path where the tests for the new class will be
# written.
Calculates the path to the file where the tests for the new class will
be written.
Calculates the path to the file where the tests for the new class will be written .
def target_spec_path
        @target_spec_path ||= begin
          class_name_parts = object_name.split('::')
          class_name_parts.delete_at(0) if class_name_parts.length > 1
          "#{File.join(module_dir, 'spec', 'classes', *class_name_parts)}_spec.rb"
        end
      end
def target_spec_path @target_spec_path ||= begin class_name_parts = object_name . split ( '::' ) class_name_parts . delete_at ( 0 ) if class_name_parts . length > 1 "#{File.join(module_dir, 'spec', 'classes', *class_name_parts)}_spec.rb" end end
Calculates the path to the file where the tests for the new class will
be written.
Calculates the path to the file where the tests for the new class will be written .
# drop the module name if the object name contains multiple parts
the path where the tests for the new class will be written.
the path where the tests for the new class will be written .
String