Class: Guard::Cedar::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/guard/cedar/runner.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Runner

Returns a new instance of Runner.



8
9
10
# File 'lib/guard/cedar/runner.rb', line 8

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/guard/cedar/runner.rb', line 6

def options
  @options
end

Instance Method Details

#compileObject



37
38
39
40
41
42
# File 'lib/guard/cedar/runner.rb', line 37

def compile
  system(
    compile_command,
    :out => "/dev/null"
  )
end

#configurationObject



12
13
14
# File 'lib/guard/cedar/runner.rb', line 12

def configuration
  options[:configuration] || "Debug"
end

#environment_optionsObject



20
21
22
# File 'lib/guard/cedar/runner.rb', line 20

def environment_options
  options[:env] || {}
end

#executeObject



44
45
46
47
48
49
50
# File 'lib/guard/cedar/runner.rb', line 44

def execute
  system(
    cedar_environment,
    execute_command,
    :unsetenv_others => true
  )
end

#project_pathObject



28
29
30
# File 'lib/guard/cedar/runner.rb', line 28

def project_path
  options[:project_path]
end

#runObject



32
33
34
35
# File 'lib/guard/cedar/runner.rb', line 32

def run
  return false unless compile
  execute
end

#sdk_versionObject



16
17
18
# File 'lib/guard/cedar/runner.rb', line 16

def sdk_version
  options[:sdk_version] || "6.1"
end

#targetObject



24
25
26
# File 'lib/guard/cedar/runner.rb', line 24

def target
  options[:target]
end