Module: Runbook
- Defined in:
- lib/runbook.rb,
lib/runbook/cli.rb,
lib/runbook/dsl.rb,
lib/runbook/run.rb,
lib/runbook/node.rb,
lib/runbook/view.rb,
lib/runbook/hooks.rb,
lib/runbook/entity.rb,
lib/runbook/errors.rb,
lib/runbook/runner.rb,
lib/runbook/viewer.rb,
lib/runbook/toolbox.rb,
lib/runbook/version.rb,
lib/runbook/statement.rb,
lib/runbook/util/runbook.rb,
lib/runbook/configuration.rb
Defined Under Namespace
Modules: DSL, Entities, Extensions, Helpers, Hooks, Run, Runs, Statements, Util, View, Views
Classes: CLI, Configuration, Entity, Node, Runner, Statement, Toolbox, Viewer
Constant Summary
collapse
- StandardError =
Class.new(::StandardError)
- VERSION =
"0.12.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
3
4
5
|
# File 'lib/runbook/configuration.rb', line 3
def configuration
@configuration
end
|
Class Method Details
._child_classes(mod) ⇒ Object
14
15
16
17
18
|
# File 'lib/runbook/util/runbook.rb', line 14
def self._child_classes(mod)
mod.constants.map { |const|
"#{mod.to_s}::#{const}".constantize
}.select { |const| const.is_a?(Class) }
end
|
._child_modules(mod) ⇒ Object
20
21
22
23
24
|
# File 'lib/runbook/util/runbook.rb', line 20
def self._child_modules(mod)
mod.constants.map { |const|
"#{mod.to_s}::#{const}".constantize
}.select { |const| const.is_a?(Module) }
end
|
.book(title, &block) ⇒ Object
81
82
83
84
85
86
87
|
# File 'lib/runbook.rb', line 81
def self.book(title, &block)
Configuration.load_config
Entities::Book.new(title).tap do |book|
book.dsl.instance_eval(&block)
register(book)
end
end
|
.books ⇒ Object
107
108
109
|
# File 'lib/runbook.rb', line 107
def self.books
@books ||= []
end
|
.entities ⇒ Object
2
3
4
|
# File 'lib/runbook/util/runbook.rb', line 2
def self.entities
_child_classes(Runbook::Entities)
end
|
.register(book) ⇒ Object
103
104
105
|
# File 'lib/runbook.rb', line 103
def self.register(book)
books << book
end
|
.reset_configuration ⇒ Object
.runs ⇒ Object
10
11
12
|
# File 'lib/runbook/util/runbook.rb', line 10
def self.runs
_child_modules(Runbook::Runs)
end
|
.section(title, &block) ⇒ Object
.statements ⇒ Object
6
7
8
|
# File 'lib/runbook/util/runbook.rb', line 6
def self.statements
_child_classes(Runbook::Statements)
end
|
.step(title = nil, &block) ⇒ Object
96
97
98
99
100
101
|
# File 'lib/runbook.rb', line 96
def self.step(title=nil, &block)
Configuration.load_config
Entities::Step.new(title).tap do |step|
step.dsl.instance_eval(&block) if block
end
end
|