Class: Kettle::Drift::Outcome

Inherits:
Object
  • Object
show all
Defined in:
lib/kettle/drift/outcome.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project_root:, files:, template_dir:, baseline_set:, results:, warning_count:, json_path:, lock_path:, mode:, diff:, exit_code:) ⇒ Outcome

Returns a new instance of Outcome.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/kettle/drift/outcome.rb', line 18

def initialize(
  project_root:,
  files:,
  template_dir:,
  baseline_set:,
  results:,
  warning_count:,
  json_path:,
  lock_path:,
  mode:,
  diff:,
  exit_code:
)
  @project_root = project_root
  @files = files
  @template_dir = template_dir
  @baseline_set = baseline_set
  @results = results
  @warning_count = warning_count
  @json_path = json_path
  @lock_path = lock_path
  @mode = mode
  @diff = diff
  @exit_code = exit_code
end

Instance Attribute Details

#baseline_setObject (readonly)

Returns the value of attribute baseline_set.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def baseline_set
  @baseline_set
end

#diffObject (readonly)

Returns the value of attribute diff.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def diff
  @diff
end

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def exit_code
  @exit_code
end

#filesObject (readonly)

Returns the value of attribute files.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def files
  @files
end

#json_pathObject (readonly)

Returns the value of attribute json_path.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def json_path
  @json_path
end

#lock_pathObject (readonly)

Returns the value of attribute lock_path.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def lock_path
  @lock_path
end

#modeObject (readonly)

Returns the value of attribute mode.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def mode
  @mode
end

#project_rootObject (readonly)

Returns the value of attribute project_root.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def project_root
  @project_root
end

#resultsObject (readonly)

Returns the value of attribute results.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def results
  @results
end

#template_dirObject (readonly)

Returns the value of attribute template_dir.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def template_dir
  @template_dir
end

#warning_countObject (readonly)

Returns the value of attribute warning_count.



6
7
8
# File 'lib/kettle/drift/outcome.rb', line 6

def warning_count
  @warning_count
end

Instance Method Details

#clean?Boolean

Returns:

  • (Boolean)


44
45
46
# File 'lib/kettle/drift/outcome.rb', line 44

def clean?
  results.empty?
end