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



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

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

.get(name) ⇒ Object



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

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

.inherited(child_class) ⇒ Object



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

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

.shared_specsObject



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

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