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.



437
438
439
# File 'lib/remi/cucumber/business_rules.rb', line 437

def initialize
  @examples = {}
end

Instance Method Details

#[](example_name) ⇒ Object



441
442
443
# File 'lib/remi/cucumber/business_rules.rb', line 441

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

#add_example(example_name, example_table) ⇒ Object



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

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

#each(&block) ⇒ Object



445
446
447
# File 'lib/remi/cucumber/business_rules.rb', line 445

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

#keysObject



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

def keys
  @examples.keys
end