class PactBroker::Client::PactFile

Public Class Methods

new(path) click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 7
def initialize path
  @path = path
end

Public Instance Methods

consumer_name() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 19
def consumer_name
  pact_hash.consumer_name
end
pact_hash() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 27
def pact_hash
  @pact_hash ||= PactHash[JSON.parse(read, symbolize_names: true)]
end
pact_name() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 15
def pact_name
  pact_hash.pact_name
end
path() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 11
def path
  @path
end
provider_name() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 23
def provider_name
  pact_hash.provider_name
end
read() click to toggle source
# File lib/pact_broker/client/pact_file.rb, line 31
def read
  @read ||= File.read(@path)
end