Sha256: 855a3ae97767e0e6338fb84ae447aa12d360863b6ead6cfbfcff44dada5e0a25
Contents?: true
Size: 796 Bytes
Versions: 99
Compression:
Stored size: 796 Bytes
Contents
module PactBroker module Api module Renderers class IntegrationsDotRenderer def initialize(integrations) @integrations = integrations end def self.call(integrations) new(integrations).call end def call "digraph { ranksep=3; ratio=auto; overlap=false; node [ shape = plaintext, fontname = Helvetica ]; #{integrations_graph} } " end private attr_reader :integrations def integrations_graph integrations .collect{ | integration| " #{escape_name(integration.consumer_name)} -> #{escape_name(integration.provider_name)}" } .join("\n") end def escape_name(name) name.tr(" ", "_") end end end end end
Version data entries
99 entries across 99 versions & 1 rubygems