Class: Vx::Builder::ScriptBuilder
- Inherits:
-
Object
- Object
- Vx::Builder::ScriptBuilder
- Includes:
- Common::Helper::Middlewares
- Defined in:
- lib/vx/builder/script_builder.rb,
lib/vx/builder/script_builder/env.rb,
lib/vx/builder/script_builder/base.rb,
lib/vx/builder/script_builder/java.rb,
lib/vx/builder/script_builder/ruby.rb,
lib/vx/builder/script_builder/cache.rb,
lib/vx/builder/script_builder/scala.rb,
lib/vx/builder/script_builder/deploy.rb,
lib/vx/builder/script_builder/script.rb,
lib/vx/builder/script_builder/clojure.rb,
lib/vx/builder/script_builder/prepare.rb,
lib/vx/builder/script_builder/services.rb
Defined Under Namespace
Classes: Base, Cache, Clojure, Deploy, Env, Java, Prepare, Ruby, Scala, Script, Services
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#task ⇒ Object
readonly
Returns the value of attribute task.
Instance Method Summary collapse
- #image ⇒ Object
-
#initialize(task, source) ⇒ ScriptBuilder
constructor
A new instance of ScriptBuilder.
- #to_after_script ⇒ Object
- #to_before_script ⇒ Object
- #to_script ⇒ Object
Constructor Details
#initialize(task, source) ⇒ ScriptBuilder
Returns a new instance of ScriptBuilder.
37 38 39 40 |
# File 'lib/vx/builder/script_builder.rb', line 37 def initialize(task, source) @source = source @task = task end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
35 36 37 |
# File 'lib/vx/builder/script_builder.rb', line 35 def source @source end |
#task ⇒ Object (readonly)
Returns the value of attribute task.
35 36 37 |
# File 'lib/vx/builder/script_builder.rb', line 35 def task @task end |
Instance Method Details
#image ⇒ Object
42 43 44 |
# File 'lib/vx/builder/script_builder.rb', line 42 def image source.image.first end |
#to_after_script ⇒ Object
66 67 68 69 70 71 72 73 74 |
# File 'lib/vx/builder/script_builder.rb', line 66 def to_after_script a = [] a << "\n# after script init" a += env.after_script_init a << "\n# after script" a += env.after_script a.join("\n") end |
#to_before_script ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/vx/builder/script_builder.rb', line 46 def to_before_script a = [] a << "\n# init" a += env.init a << "\n# before install" a += env.before_install a << "\n# announce" a += env.announce a << "\n# install" a += env.install a << "\n# before script" a += env.before_script a.join("\n") end |
#to_script ⇒ Object
76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/vx/builder/script_builder.rb', line 76 def to_script a = [] a << "\n# script" a += env.script a << "\n# after success" a += env.after_success a.join("\n") end |