Class: Cucumber::Core::Ast::Step

Inherits:
Object
  • Object
show all
Includes:
DescribesItself, HasLocation
Defined in:
lib/cucumber/core/ast/step.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DescribesItself

#describe_to

Methods included from HasLocation

#attributes, #comments, #file, #file_colon_line, #line, #location, #match_locations?, #tags

Constructor Details

#initialize(language, location, keyword, name, multiline_arg) ⇒ Step

Returns a new instance of Step.



13
14
15
# File 'lib/cucumber/core/ast/step.rb', line 13

def initialize(language, location, keyword, name, multiline_arg)
  @location, @keyword, @name, @multiline_arg = location, keyword, name, multiline_arg
end

Instance Attribute Details

#exceptionObject (readonly)

Returns the value of attribute exception.



11
12
13
# File 'lib/cucumber/core/ast/step.rb', line 11

def exception
  @exception
end

#keywordObject (readonly)

Returns the value of attribute keyword.



11
12
13
# File 'lib/cucumber/core/ast/step.rb', line 11

def keyword
  @keyword
end

#languageObject (readonly)

Returns the value of attribute language.



11
12
13
# File 'lib/cucumber/core/ast/step.rb', line 11

def language
  @language
end

#multiline_argObject (readonly)

Returns the value of attribute multiline_arg.



11
12
13
# File 'lib/cucumber/core/ast/step.rb', line 11

def multiline_arg
  @multiline_arg
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/cucumber/core/ast/step.rb', line 11

def name
  @name
end

Instance Method Details

#gherkin_statement(statement = nil) ⇒ Object



17
18
19
# File 'lib/cucumber/core/ast/step.rb', line 17

def gherkin_statement(statement=nil)
  @gherkin_statement ||= statement
end

#to_sexpObject



21
22
23
# File 'lib/cucumber/core/ast/step.rb', line 21

def to_sexp
  [:step, line, keyword, name, @multiline_arg.to_sexp]
end