Class: YARD::CodeObjects::Cucumber::Step

Inherits:
Base
  • Object
show all
Defined in:
lib/yard/code_objects/cucumber/step.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#path

Methods included from LocationHelper

#file, #line_number, #location

Constructor Details

#initialize(namespace, name) ⇒ Step

Returns a new instance of Step.



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

def initialize(namespace,name)
  super(namespace,name.to_s.strip)
  @comments = @definition = @description = @keyword = @table = @text = @value = nil
  @examples = {}
  @transforms = []
end

Instance Attribute Details

#commentsObject

Returns the value of attribute comments.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def comments
  @comments
end

#definitionObject

Returns the value of attribute definition.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def definition
  @definition
end

#examplesObject

Returns the value of attribute examples.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def examples
  @examples
end

#keywordObject

Returns the value of attribute keyword.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def keyword
  @keyword
end

#scenarioObject

Returns the value of attribute scenario.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def scenario
  @scenario
end

#tableObject

Returns the value of attribute table.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def table
  @table
end

#textObject

Returns the value of attribute text.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def text
  @text
end

#transformsObject

Returns the value of attribute transforms.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def transforms
  @transforms
end

#valueObject

Returns the value of attribute value.



7
8
9
# File 'lib/yard/code_objects/cucumber/step.rb', line 7

def value
  @value
end

Instance Method Details

#has_table?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/yard/code_objects/cucumber/step.rb', line 16

def has_table?
  !@table.nil?
end

#has_text?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/yard/code_objects/cucumber/step.rb', line 20

def has_text?
  !@text.nil?
end

#transformed?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/yard/code_objects/cucumber/step.rb', line 29

def transformed?
  !@transforms.empty?
end