Class: Chap::Strategy::Base

Inherits:
Object
  • Object
show all
Includes:
Chap::SpecialMethods
Defined in:
lib/chap/strategy/base.rb

Direct Known Subclasses

Checkout, Copy

Constant Summary

Constants included from Chap::SpecialMethods

Chap::SpecialMethods::SPECIAL_METHODS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Chap::SpecialMethods

included

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



7
8
9
10
11
# File 'lib/chap/strategy/base.rb', line 7

def initialize(options={})
  @options = options
  @config = options[:config]
  log "Deploying via #{self.class} strategy".colorize(:green)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



6
7
8
# File 'lib/chap/strategy/base.rb', line 6

def config
  @config
end

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/chap/strategy/base.rb', line 6

def options
  @options
end

Instance Method Details

#deployObject

should download code to the release_path



14
15
16
# File 'lib/chap/strategy/base.rb', line 14

def deploy
  raise "Must implement deploy method"
end