Class: Restflow::Sequences

Inherits:
Object
  • Object
show all
Defined in:
lib/restflow/sequence.rb

Instance Method Summary collapse

Instance Method Details

#base_url(url) ⇒ Object



17
18
19
# File 'lib/restflow/sequence.rb', line 17

def base_url(url)
  @base_url = url
end

#parse_flow_file(path) ⇒ Object



5
6
7
8
9
10
# File 'lib/restflow/sequence.rb', line 5

def parse_flow_file(path)
  @sequences = []
  @execution_dir = File.dirname(path)
  instance_eval(File.read(path), path)
  Restflow::Report.run(@sequences)
end

#sequence(description, &block) ⇒ Object



12
13
14
15
# File 'lib/restflow/sequence.rb', line 12

def sequence(description, &block)
  puts "Running < #{description} >"
  @sequences << Sequence.new(@execution_dir, description , @base_url, &block)
end