Class: InchCI::Action::FindProjectAndBranch

Inherits:
Object
  • Object
show all
Defined in:
lib/inch_ci/action.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ FindProjectAndBranch

Returns a new instance of FindProjectAndBranch.


34
35
36
37
38
# File 'lib/inch_ci/action.rb', line 34

def initialize(params)
  uid = ProjectUID.new(params).project_uid
  @project = InchCI::Store::FindProject.call(uid)
  @branch = find_branch(params[:branch]) if !@project.nil?
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch


28
29
30
# File 'lib/inch_ci/action.rb', line 28

def branch
  @branch
end

#projectObject (readonly)

Returns the value of attribute project


28
29
30
# File 'lib/inch_ci/action.rb', line 28

def project
  @project
end

Class Method Details

.call(*args) ⇒ Object


30
31
32
# File 'lib/inch_ci/action.rb', line 30

def self.call(*args)
  new(*args)
end