Module: Chaindrive::Gear Abstract
- Defined in:
- lib/chaindrive/gear.rb,
lib/chaindrive/gear/provisioner.rb,
lib/chaindrive/gearbox/isolation.rb,
lib/chaindrive/gear/specification.rb
Overview
This module is abstract.
Defined Under Namespace
Classes: Isolation, Provisioner, Specification
Class Attribute Summary collapse
-
.specifications ⇒ Object
readonly
Returns the value of attribute specifications.
Class Method Summary collapse
-
.define(name = nil, &block) ⇒ Specification
Produce a Gear Specification from a block and hash.
Class Attribute Details
.specifications ⇒ Object (readonly)
Returns the value of attribute specifications.
10 11 12 |
# File 'lib/chaindrive/gear.rb', line 10 def specifications @specifications end |
Class Method Details
.define(name = nil, &block) ⇒ Specification
Produce a Gear Specification from a block and hash.
17 18 19 20 21 22 23 24 |
# File 'lib/chaindrive/gear.rb', line 17 def define(name = nil, &block) hash = { name: name.to_s } if name @@specifications ||= [] Hashie::Blash.new(hash).tap do |m| yield m if block_given? return Specification.new(m).tap { |s| @@specifications << s } end end |