Class: YARD::CodeObjects::Cucumber::FeatureDirectory

Inherits:
NamespaceObject
  • Object
show all
Defined in:
lib/yard/code_objects/cucumber/namespace_object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(namespace, name) ⇒ FeatureDirectory

Returns a new instance of FeatureDirectory.



21
22
23
24
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 21

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

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



19
20
21
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 19

def description
  @description
end

Instance Method Details

#expanded_pathObject



30
31
32
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 30

def expanded_path
  to_s.split('::')[1..-1].join('/')
end

#featuresObject



38
39
40
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 38

def features
  children.find_all { |d| d.is_a?(Feature) }
end

#locationObject



26
27
28
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 26

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

#subdirectoriesObject



42
43
44
45
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 42

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

#valueObject



34
35
36
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 34

def value;
  name;
end