Class: EY::Serverside::Callbacks::Executor::Base
- Inherits:
-
Object
- Object
- EY::Serverside::Callbacks::Executor::Base
show all
- Includes:
- Railway
- Defined in:
- lib/engineyard-serverside/callbacks/executor/base.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Railway
#call, included
#Failure, #Success
Constructor Details
#initialize(config, shell, hook) ⇒ Base
Returns a new instance of Base.
17
18
19
20
21
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 17
def initialize(config, shell, hook)
@config = config
@shell = shell
@hook = hook
end
|
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
11
12
13
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 11
def config
@config
end
|
#hook ⇒ Object
Returns the value of attribute hook.
11
12
13
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 11
def hook
@hook
end
|
#shell ⇒ Object
Returns the value of attribute shell.
11
12
13
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 11
def shell
@shell
end
|
Class Method Details
.execute(config, shell, hook) ⇒ Object
13
14
15
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 13
def self.execute(config, shell, hook)
new(config, shell, hook).execute
end
|
Instance Method Details
#execute ⇒ Object
23
24
25
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 23
def execute
call.or_else {|payload| handle_failure(payload)}
end
|
#handle_failure(payload = {}) ⇒ Object
27
28
29
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 27
def handle_failure(payload = {})
raise "Unimplemented Hook Executor!"
end
|
#hook_path ⇒ Object
35
36
37
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 35
def hook_path
hook.path
end
|
#paths ⇒ Object
31
32
33
|
# File 'lib/engineyard-serverside/callbacks/executor/base.rb', line 31
def paths
config.paths
end
|