Class: Sapphire::DSL::Scenarios::Broken

Inherits:
Object
  • Object
show all
Defined in:
lib/sapphire/DSL/Scenarios/Broken.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Broken

Returns a new instance of Broken.



13
14
15
16
# File 'lib/sapphire/DSL/Scenarios/Broken.rb', line 13

def initialize(text)
  @text = text
  @and = []
end

Instance Attribute Details

#andObject (readonly)

Returns the value of attribute and.



11
12
13
# File 'lib/sapphire/DSL/Scenarios/Broken.rb', line 11

def and
  @and
end

#textObject (readonly)

Returns the value of attribute text.



10
11
12
# File 'lib/sapphire/DSL/Scenarios/Broken.rb', line 10

def text
  @text
end

Instance Method Details

#add_and(text, &block) ⇒ Object



18
19
20
# File 'lib/sapphire/DSL/Scenarios/Broken.rb', line 18

def add_and(text, &block)
  self.and << Then.new(text, &block)
end

#to_sObject



22
23
24
# File 'lib/sapphire/DSL/Scenarios/Broken.rb', line 22

def to_s
  self.text
end