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.



448
449
450
# File 'lib/remi/cucumber/business_rules.rb', line 448

def initialize
  @examples = {}
end

Instance Method Details

#[](example_name) ⇒ Object



452
453
454
# File 'lib/remi/cucumber/business_rules.rb', line 452

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

#add_example(example_name, example_table) ⇒ Object



464
465
466
# File 'lib/remi/cucumber/business_rules.rb', line 464

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

#each(&block) ⇒ Object



456
457
458
# File 'lib/remi/cucumber/business_rules.rb', line 456

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

#keysObject



460
461
462
# File 'lib/remi/cucumber/business_rules.rb', line 460

def keys
  @examples.keys
end