Class: Migrant::Bootstrappers::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/migrant/bootstrappers/base.rb

Overview

Base class for all boostrappers.

Direct Known Subclasses

RubyLocal192, RubyLocal193

Class Method Summary collapse

Instance Method Summary collapse

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

.defaultObject



19
20
21
# File 'lib/migrant/bootstrappers/base.rb', line 19

def self.default
  @@default
end

.default_bootstrapperObject



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

Returns:

  • (Boolean)


33
34
35
# File 'lib/migrant/bootstrappers/base.rb', line 33

def bootstrapped?
  raise "Invalid Bootstrapper"
end

#runObject

Run the bootstrapping process



28
29
30
# File 'lib/migrant/bootstrappers/base.rb', line 28

def run
  raise "Invalid Bootstrapper"
end