Class: GreenPepper::Scenario

Inherits:
Object
  • Object
show all
Defined in:
lib/greenpepper/parser/scenario.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fixture_name) ⇒ Scenario

Returns a new instance of Scenario.



11
12
13
14
# File 'lib/greenpepper/parser/scenario.rb', line 11

def initialize(fixture_name)
  @lines = []
  @fixture_name = fixture_name
end

Instance Attribute Details

#fixture_nameObject (readonly)

Returns the value of attribute fixture_name.



10
11
12
# File 'lib/greenpepper/parser/scenario.rb', line 10

def fixture_name
  @fixture_name
end

#linesObject (readonly)

Returns the value of attribute lines.



10
11
12
# File 'lib/greenpepper/parser/scenario.rb', line 10

def lines
  @lines
end

Instance Method Details

#add_line(line) ⇒ Object



16
17
18
# File 'lib/greenpepper/parser/scenario.rb', line 16

def add_line(line)
  @lines << line
end

#add_lines(lines) ⇒ Object



20
21
22
# File 'lib/greenpepper/parser/scenario.rb', line 20

def add_lines(lines)
  @lines = @lines + lines
end