Class: Lucid::AST::StepResult

Inherits:
Object
  • Object
show all
Defined in:
lib/lucid/ast/step_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line) ⇒ StepResult

Returns a new instance of StepResult.



7
8
9
# File 'lib/lucid/ast/step_result.rb', line 7

def initialize(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
  @keyword, @step_match, @multiline_arg, @status, @exception, @source_indent, @background, @file_colon_line = keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line
end

Instance Attribute Details

#backgroundObject (readonly)

Returns the value of attribute background.



4
5
6
# File 'lib/lucid/ast/step_result.rb', line 4

def background
  @background
end

#exceptionObject (readonly)

Returns the value of attribute exception.



4
5
6
# File 'lib/lucid/ast/step_result.rb', line 4

def exception
  @exception
end

#file_colon_lineObject (readonly)

Returns the value of attribute file_colon_line.



5
6
7
# File 'lib/lucid/ast/step_result.rb', line 5

def file_colon_line
  @file_colon_line
end

#keywordObject (readonly)

Returns the value of attribute keyword.



4
5
6
# File 'lib/lucid/ast/step_result.rb', line 4

def keyword
  @keyword
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/lucid/ast/step_result.rb', line 4

def status
  @status
end

#step_matchObject (readonly)

Returns the value of attribute step_match.



4
5
6
# File 'lib/lucid/ast/step_result.rb', line 4

def step_match
  @step_match
end

#step_multiline_classObject (readonly)

Returns the value of attribute step_multiline_class.



5
6
7
# File 'lib/lucid/ast/step_result.rb', line 5

def step_multiline_class
  @step_multiline_class
end

Instance Method Details

#accept(visitor) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/lucid/ast/step_result.rb', line 11

def accept(visitor)
  visitor.step_result(self) do
    visitor.visit_step_name(@keyword, @step_match, @status, @source_indent, @background, @file_colon_line)
    visitor.visit_multiline_arg(@multiline_arg) if @multiline_arg
    visitor.visit_exception(@exception, @status) if @exception
  end
end

#argsObject



19
20
21
# File 'lib/lucid/ast/step_result.rb', line 19

def args
  [@keyword, @step_match, @multiline_arg, @status, @exception, @source_indent, @background, @file_colon_line]
end

#step_argumentsObject



31
32
33
# File 'lib/lucid/ast/step_result.rb', line 31

def step_arguments
  @step_match.step_arguments
end

#step_definitionObject



27
28
29
# File 'lib/lucid/ast/step_result.rb', line 27

def step_definition
  @step_match.step_definition
end

#step_nameObject



23
24
25
# File 'lib/lucid/ast/step_result.rb', line 23

def step_name
  @step_match.name
end