Skip to content

Commit

Permalink
feat: add title, name and title_or_name methods to Link
Browse files Browse the repository at this point in the history
  • Loading branch information
bethesque committed Jun 13, 2018
1 parent c90b608 commit dc24caa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/pact_broker/client/hal/link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ def run(payload = nil)
end
end

def title_or_name
title || name
end

def title
@attrs['title']
end

def name
@attrs['name']
end

def get(payload = {}, headers = {})
wrap_response(@http_client.get(href, payload, headers))
end
Expand Down

0 comments on commit dc24caa

Please sign in to comment.