Class: Remi::Testing::BusinessRules::DataExampleCollection
- Inherits:
-
Object
- Object
- Remi::Testing::BusinessRules::DataExampleCollection
- Includes:
- Enumerable
- Defined in:
- lib/remi/testing/business_rules.rb
Instance Method Summary collapse
- #[](example_name) ⇒ Object
- #add_example(example_name, example_table) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize ⇒ DataExampleCollection
constructor
A new instance of DataExampleCollection.
- #keys ⇒ Object
Constructor Details
#initialize ⇒ DataExampleCollection
Returns a new instance of DataExampleCollection.
514 515 516 |
# File 'lib/remi/testing/business_rules.rb', line 514 def initialize @examples = {} end |
Instance Method Details
#[](example_name) ⇒ Object
518 519 520 |
# File 'lib/remi/testing/business_rules.rb', line 518 def [](example_name) @examples[example_name] end |
#add_example(example_name, example_table) ⇒ Object
530 531 532 |
# File 'lib/remi/testing/business_rules.rb', line 530 def add_example(example_name, example_table) @examples[example_name] = DataExample.new(example_table) unless @examples.include? example_name end |
#each(&block) ⇒ Object
522 523 524 |
# File 'lib/remi/testing/business_rules.rb', line 522 def each(&block) @examples.each(&block) end |
#keys ⇒ Object
526 527 528 |
# File 'lib/remi/testing/business_rules.rb', line 526 def keys @examples.keys end |