Sha256: c3548c123d3ead621f3be5f244ce919fcdffe51ce3995c0c5689507413032c30

Contents?: true

Size: 1.27 KB

Versions: 19

Compression:

Stored size: 1.27 KB

Contents

module YARD::CodeObjects::Cucumber
  
  class NamespaceObject < YARD::CodeObjects::NamespaceObject
    include LocationHelper
    def value ; nil ; end
  end

  class Requirements < NamespaceObject ; end
  class FeatureTags < NamespaceObject ; end
  class StepTransformersObject < NamespaceObject ; end

  class FeatureDirectory < YARD::CodeObjects::NamespaceObject

    attr_accessor :description

    def initialize(namespace,name)
      super(namespace,name)
      @description = ""
    end

    def location
      files.first.first if files && !files.empty?
    end

    def value ; name ; end
    
    def features
      children.find_all {|d| d.is_a?(Feature) } 
    end
    
    def subdirectories
      subdirectories = children.find_all {|d| d.is_a?(FeatureDirectory) }
      subdirectories + subdirectories.collect {|s| s.subdirectories }.flatten
    end
         
  end

  CUCUMBER_NAMESPACE = Requirements.new(:root, "requirements") unless defined?(CUCUMBER_NAMESPACE)
  
  CUCUMBER_TAG_NAMESPACE = FeatureTags.new(CUCUMBER_NAMESPACE, "tags") unless defined?(CUCUMBER_TAG_NAMESPACE)
  
  CUCUMBER_STEPTRANSFORM_NAMESPACE = StepTransformersObject.new(CUCUMBER_NAMESPACE, "step_transformers") unless defined?(CUCUMBER_STEPTRANSFORM_NAMESPACE)
  
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
yard-cucumber-2.3.2 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.3.1 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.3.0 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.2.3 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.2.2 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.2.1 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.2.0 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.7 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.6 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.5 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.4 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.3 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.2 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.1 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.1.0 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.0.3 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.0.2 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.0.1 lib/yard/code_objects/cucumber/namespace_object.rb
yard-cucumber-2.0.0 lib/yard/code_objects/cucumber/namespace_object.rb