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.



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

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.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def comments
  @comments
end

#definitionObject

Returns the value of attribute definition.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def definition
  @definition
end

#examplesObject

Returns the value of attribute examples.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def examples
  @examples
end

#keywordObject

Returns the value of attribute keyword.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def keyword
  @keyword
end

#scenarioObject

Returns the value of attribute scenario.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def scenario
  @scenario
end

#tableObject

Returns the value of attribute table.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def table
  @table
end

#textObject

Returns the value of attribute text.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def text
  @text
end

#transformsObject

Returns the value of attribute transforms.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def transforms
  @transforms
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/yard/code_objects/cucumber/step.rb', line 4

def value
  @value
end

Instance Method Details

#has_table?Boolean

Returns:

  • (Boolean)


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

def has_table?
  !@table.nil?
end

#has_text?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/yard/code_objects/cucumber/step.rb', line 25

def has_text?
  !@text.nil?
end

#transformed?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/yard/code_objects/cucumber/step.rb', line 37

def transformed?
  !@transforms.empty?
end