Class: Vx::Builder::Script

Inherits:
Object
  • Object
show all
Includes:
Common::Helper::Middlewares
Defined in:
lib/vx/builder/script.rb,
lib/vx/builder/script/env.rb,
lib/vx/builder/script/ruby.rb,
lib/vx/builder/script/script.rb,
lib/vx/builder/script/prepare.rb,
lib/vx/builder/script/services.rb,
lib/vx/builder/script/webdav_cache.rb

Defined Under Namespace

Classes: Env, Prepare, Ruby, Script, Services, WebdavCache

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task, source) ⇒ Script

Returns a new instance of Script.



28
29
30
31
# File 'lib/vx/builder/script.rb', line 28

def initialize(task, source)
  @source = source
  @task   = task
end

Instance Attribute Details

#source ⇒ Object (readonly)

Returns the value of attribute source.



26
27
28
# File 'lib/vx/builder/script.rb', line 26

def source
  @source
end

#task ⇒ Object (readonly)

Returns the value of attribute task.



26
27
28
# File 'lib/vx/builder/script.rb', line 26

def task
  @task
end

Instance Method Details

#to_after_script ⇒ Object



52
53
54
55
56
57
# File 'lib/vx/builder/script.rb', line 52

def to_after_script
  a = []
  a << "\n# after script"
  a += env.after_script
  a.join("\n")
end

#to_before_script ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/vx/builder/script.rb', line 33

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



59
60
61
62
63
64
# File 'lib/vx/builder/script.rb', line 59

def to_script
  a = []
  a << "\n# script"
  a += env.script
  a.join("\n")
end