Class: Migrant::Bootstrappers::Base
- Inherits:
-
Object
- Object
- Migrant::Bootstrappers::Base
- Defined in:
- lib/migrant/bootstrappers/base.rb
Overview
Base class for all boostrappers.
Direct Known Subclasses
Class Method Summary collapse
- .default ⇒ Object
- .default_bootstrapper ⇒ Object
- .register(shortcut) ⇒ Object
- .registered(shortcut) ⇒ Object
Instance Method Summary collapse
-
#bootstrapped? ⇒ Boolean
Returns true if the box is already bootstrapped.
-
#initialize(env) ⇒ Base
constructor
A new instance of Base.
-
#run ⇒ Object
Run the bootstrapping process.
Constructor Details
#initialize(env) ⇒ Base
Returns a new instance of Base.
23 24 25 |
# File 'lib/migrant/bootstrappers/base.rb', line 23 def initialize(env) @environment = env end |
Class Method Details
.default ⇒ Object
19 20 21 |
# File 'lib/migrant/bootstrappers/base.rb', line 19 def self.default @@default end |
.default_bootstrapper ⇒ Object
15 16 17 |
# File 'lib/migrant/bootstrappers/base.rb', line 15 def self.default_bootstrapper @@default = self end |
.register(shortcut) ⇒ Object
6 7 8 9 |
# File 'lib/migrant/bootstrappers/base.rb', line 6 def self.register(shortcut) @@bootstrappers ||= Hash.new @@bootstrappers[shortcut] = self end |
.registered(shortcut) ⇒ Object
11 12 13 |
# File 'lib/migrant/bootstrappers/base.rb', line 11 def self.registered(shortcut) @@bootstrappers[shortcut] end |
Instance Method Details
#bootstrapped? ⇒ Boolean
Returns true if the box is already bootstrapped
33 34 35 |
# File 'lib/migrant/bootstrappers/base.rb', line 33 def bootstrapped? raise "Invalid Bootstrapper" end |
#run ⇒ Object
Run the bootstrapping process
28 29 30 |
# File 'lib/migrant/bootstrappers/base.rb', line 28 def run raise "Invalid Bootstrapper" end |