Class: Rohbau::SharedSpec::SpecIndex

Inherits:
Object
  • Object
show all
Defined in:
lib/rohbau/shared_spec.rb

Class Method Summary collapse

Class Method Details

.allObject



32
33
34
# File 'lib/rohbau/shared_spec.rb', line 32

def self.all
  @specs.dup
end

.get(name) ⇒ Object



36
37
38
39
40
41
42
# File 'lib/rohbau/shared_spec.rb', line 36

def self.get(name)
  @specs.each do |spec|
    found = spec.get(name)
    return found if found
  end
  nil
end

.register(shared_spec_class) ⇒ Object



27
28
29
30
# File 'lib/rohbau/shared_spec.rb', line 27

def self.register(shared_spec_class)
  reset unless @specs
  @specs << shared_spec_class
end

.resetObject



23
24
25
# File 'lib/rohbau/shared_spec.rb', line 23

def self.reset
  @specs = []
end