Class: Rohbau::SharedSpec

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

Defined Under Namespace

Classes: SpecIndex

Class Method Summary collapse

Class Method Details

.for(name, &block) ⇒ Object



6
7
8
# File 'lib/rohbau/shared_spec.rb', line 6

def self.for(name, &block)
  shared_specs[name] = Proc.new(&block)
end

.get(name) ⇒ Object



10
11
12
# File 'lib/rohbau/shared_spec.rb', line 10

def self.get(name)
  shared_specs[name]
end

.inherited(child_class) ⇒ Object



14
15
16
# File 'lib/rohbau/shared_spec.rb', line 14

def self.inherited(child_class)
  SpecIndex.register child_class
end

.shared_specsObject



18
19
20
# File 'lib/rohbau/shared_spec.rb', line 18

def self.shared_specs
  @shared_specs ||= {}
end