Class: InchCI::Worker::BuildJSON::Task

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/worker/build_json/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ Task



11
12
13
14
15
16
17
18
19
20
# File 'lib/inch_ci/worker/build_json/task.rb', line 11

def initialize(filename)
  @json = BuildJSON.json(filename)
  @work_dir = Dir.mktmpdir

  started_at = Time.now
  @result = build(filename)
  @result.finished_at = Time.now
  @result.started_at = started_at
  puts Build::Report.new(@result).to_yaml
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



9
10
11
# File 'lib/inch_ci/worker/build_json/task.rb', line 9

def json
  @json
end