Class: Rohbau::SharedSpec::SpecIndex

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

Class Method Summary collapse

Class Method Details

.allObject



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

def self.all
  @specs.dup
end

.get(name) ⇒ Object



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

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

.register(shared_spec_class) ⇒ Object



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

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

.resetObject



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

def self.reset
  @specs = []
end