Class: Remi::BusinessRules::DataExampleCollection

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/remi/cucumber/business_rules.rb

Instance Method Summary collapse

Constructor Details

#initializeDataExampleCollection

Returns a new instance of DataExampleCollection.



402
403
404
# File 'lib/remi/cucumber/business_rules.rb', line 402

def initialize
  @examples = {}
end

Instance Method Details

#[](example_name) ⇒ Object



406
407
408
# File 'lib/remi/cucumber/business_rules.rb', line 406

def [](example_name)
  @examples[example_name]
end

#add_example(example_name, example_table) ⇒ Object



418
419
420
# File 'lib/remi/cucumber/business_rules.rb', line 418

def add_example(example_name, example_table)
  @examples[example_name] = DataExample.new(example_table) unless @examples.include? example_name
end

#each(&block) ⇒ Object



410
411
412
# File 'lib/remi/cucumber/business_rules.rb', line 410

def each(&block)
  @examples.each(&block)
end

#keysObject



414
415
416
# File 'lib/remi/cucumber/business_rules.rb', line 414

def keys
  @examples.keys
end