Class: Action::Build::Show

Inherits:
Object
  • Object
show all
Includes:
InchCI::Action
Defined in:
app/services/action/build/show.rb

Instance Method Summary collapse

Methods included from InchCI::Action

#exposures, included

Constructor Details

#initialize(params, load_dump: false, load_diff: false) ⇒ Show

Returns a new instance of Show.


10
11
12
13
14
15
16
17
18
19
20
# File 'app/services/action/build/show.rb', line 10

def initialize(params, load_dump: false, load_diff: false)
  if uid = params[:id]
    @build = BuildPresenter.new(InchCI::Store::FindBuild.call(uid))
    if load_diff && @build.revision_diff
      @code_object_map = create_code_object_map([@build.revision_diff])
    end
    if load_dump
      load_dump_if_present
    end
  end
end