class PactBroker::UI::ViewDomain::MatrixBranch

Attributes

branch_version[R]
pacticipant_name[R]

Public Class Methods

new(branch_version, pacticipant_name) click to toggle source
# File lib/pact_broker/ui/view_models/matrix_branch.rb, line 12
def initialize branch_version, pacticipant_name
  @branch_version = branch_version
  @pacticipant_name = pacticipant_name
end

Public Instance Methods

latest?() click to toggle source
# File lib/pact_broker/ui/view_models/matrix_branch.rb, line 29
def latest?
  branch_version.latest?
end
name() click to toggle source
# File lib/pact_broker/ui/view_models/matrix_branch.rb, line 17
def name
  branch_version.branch_name
end
tooltip() click to toggle source
# File lib/pact_broker/ui/view_models/matrix_branch.rb, line 21
def tooltip
  if branch_version.latest?
    "This is the latest version of #{pacticipant_name} from branch \"#{branch_version.branch_name}\"."
  else
    "This version of #{pacticipant_name} is from branch \"#{branch_version.branch_name}\". A more recent version from this branch exists."
  end
end