Sha256: 139d3f4a663e26adc3df311ccbcdcfbae7524fbfe1bd1e72a3e1303e60ca4454

Contents?: true

Size: 773 Bytes

Versions: 3

Compression:

Stored size: 773 Bytes

Contents

module YARD::Templates::Helpers

  module BaseHelper

    def format_object_title(object)
      if object.is_a?(YARD::CodeObjects::Cucumber::FeatureTags)
        "Tags"
      elsif object.is_a?(YARD::CodeObjects::Cucumber::StepTransformers)
        "Step Definitions and Placeholders"
      elsif object.is_a?(YARD::CodeObjects::Cucumber::NamespaceObject)
        "#{format_object_type(object)}#{object.value ? ": #{object.value}" : ''}"
      elsif object.is_a?(YARD::CodeObjects::Cucumber::FeatureDirectory)
        "Feature Directory: #{object.name}"
      else
        case object
        when YARD::CodeObjects::RootObject
          "Top Level Namespace"
        else
          format_object_type(object) + ": " + object.path
        end
      end
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yard-gherkin-turnip-1.0.2 lib/yard/templates/helpers/base_helper.rb
yard-gherkin-turnip-1.0.1 lib/yard/templates/helpers/base_helper.rb
yard-gherkin-turnip-1.0.0 lib/yard/templates/helpers/base_helper.rb