Class: Lerna::Strategy
- Inherits:
-
Object
- Object
- Lerna::Strategy
- Defined in:
- lib/lerna/strategy.rb
Direct Known Subclasses
Lerna::Strategies::DualExternal, Lerna::Strategies::ExternalDigitalOnly, Lerna::Strategies::InternalOnly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(displays) ⇒ Strategy
constructor
A new instance of Strategy.
Constructor Details
#initialize(displays) ⇒ Strategy
Returns a new instance of Strategy.
13 14 15 |
# File 'lib/lerna/strategy.rb', line 13 def initialize(displays) @displays = displays end |
Class Method Details
.inherited(subclass) ⇒ Object
7 8 9 10 11 |
# File 'lib/lerna/strategy.rb', line 7 def self.inherited(subclass) name = subclass.to_s.split(/::/).last hyphenated = name.scan(/[A-Z][a-z_0-9]+/).map(&:downcase).join('-') registry[hyphenated] = subclass end |
.registry ⇒ Object
3 4 5 |
# File 'lib/lerna/strategy.rb', line 3 def self.registry @registry ||= {} end |