Class: YARD::CodeObjects::Cucumber::FeatureDirectory
- Inherits:
-
NamespaceObject
- Object
- NamespaceObject
- YARD::CodeObjects::Cucumber::FeatureDirectory
- Defined in:
- lib/yard/code_objects/cucumber/namespace_object.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
Instance Method Summary collapse
- #expanded_path ⇒ Object
- #features ⇒ Object
-
#initialize(namespace, name) ⇒ FeatureDirectory
constructor
A new instance of FeatureDirectory.
- #location ⇒ Object
- #subdirectories ⇒ Object
- #value ⇒ Object
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
#description ⇒ Object
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_path ⇒ Object
30 31 32 |
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 30 def to_s.split('::')[1..-1].join('/') end |
#features ⇒ Object
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 |
#location ⇒ Object
26 27 28 |
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 26 def location files.first.first if files && !files.empty? end |
#subdirectories ⇒ Object
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 |
#value ⇒ Object
34 35 36 |
# File 'lib/yard/code_objects/cucumber/namespace_object.rb', line 34 def value; name; end |