Class: Vx::Builder::Script::Clojure

Inherits:
Struct
  • Object
show all
Includes:
Helper::TraceShCommand
Defined in:
lib/vx/builder/script/clojure.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper::TraceShCommand

#trace_sh_command

Instance Attribute Details

#appObject

Returns the value of attribute app

Returns:

  • (Object)

    the current value of app



5
6
7
# File 'lib/vx/builder/script/clojure.rb', line 5

def app
  @app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/vx/builder/script/clojure.rb', line 9

def call(env)
  if enabled?(env)
    env.announce.tap do |i|
      i << trace_sh_command("lein version")
    end

    env.install.tap do |i|
      i << trace_sh_command("lein deps")
    end

    if env.source.script.empty?
      env.script.tap do |i|
        i << trace_sh_command("lein test")
      end
    end
  end

  app.call(env)
end