Class: PactBroker::Api::Contracts::PutPacticipantNameContract
Instance Method Summary
collapse
#blank?, #empty?
Methods included from Messages
#message, #potential_duplicate_pacticipant_message, #validation_message
Instance Method Details
#name_in_path_matches_name_in_pact ⇒ Object
17
18
19
20
21
22
23
|
# File 'lib/pact_broker/api/contracts/put_pact_params_contract.rb', line 17
def name_in_path_matches_name_in_pact
if present?(name) && present?(name_in_pact)
if name != name_in_pact
errors.add(:name, validation_message('pacticipant_name_mismatch', message_args))
end
end
end
|
#present?(string) ⇒ Boolean
25
26
27
|
# File 'lib/pact_broker/api/contracts/put_pact_params_contract.rb', line 25
def present? string
string && !blank?(string)
end
|