Class: Rohbau::SharedSpec
- Inherits:
-
Proc
- Object
- Proc
- Rohbau::SharedSpec
- Defined in:
- lib/rohbau/shared_spec.rb
Defined Under Namespace
Classes: SpecIndex
Class Method Summary collapse
- .for(name, &block) ⇒ Object
- .get(name) ⇒ Object
- .inherited(child_class) ⇒ Object
- .shared_specs ⇒ Object
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_specs ⇒ Object
19 20 21 |
# File 'lib/rohbau/shared_spec.rb', line 19 def self.shared_specs @shared_specs ||= {} end |