Class: YARD::CodeObjects::Cucumber::Feature

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from LocationHelper

#file, #line_number, #location

Constructor Details

#initialize(namespace, name) ⇒ Feature

Returns a new instance of Feature.



9
10
11
12
13
14
# File 'lib/yard/code_objects/cucumber/feature.rb', line 9

def initialize(namespace, name)
  @comments = ""
  @scenarios = []
  @tags = []
  super(namespace, name.to_s.strip)
end

Instance Attribute Details

#backgroundObject

Returns the value of attribute background.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def background
  @background
end

#commentsObject

Returns the value of attribute comments.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def comments
  @comments
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def description
  @description
end

#keywordObject

Returns the value of attribute keyword.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def keyword
  @keyword
end

#scenariosObject

Returns the value of attribute scenarios.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def scenarios
  @scenarios
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def tags
  @tags
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/yard/code_objects/cucumber/feature.rb', line 3

def value
  @value
end

Instance Method Details

#total_scenariosObject



5
6
7
# File 'lib/yard/code_objects/cucumber/feature.rb', line 5

def total_scenarios
  scenarios.count
end