Class: RSpec::Permutations::Parser
- Inherits:
-
Object
- Object
- RSpec::Permutations::Parser
- Defined in:
- lib/rspec/permutations/parser.rb
Defined Under Namespace
Classes: PermutationBlock, Table
Instance Method Summary collapse
-
#initialize(spec_file) ⇒ Parser
constructor
A new instance of Parser.
- #permutations(name = nil) ⇒ Object
Constructor Details
#initialize(spec_file) ⇒ Parser
Returns a new instance of Parser.
6 7 8 |
# File 'lib/rspec/permutations/parser.rb', line 6 def initialize(spec_file) @spec_file = spec_file end |
Instance Method Details
#permutations(name = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/rspec/permutations/parser.rb', line 10 def permutations(name = nil) if name permutation_blocks.find { |pb| pb.name == name }.permutations else permutation_blocks.first.permutations end end |