module EventStore::HTTP::Connect::Controls::Settings

Public Class Methods

example(host: nil, namespace: nil, **attributes) click to toggle source
# File lib/event_store/http/connect/controls/settings.rb, line 6
def self.example(host: nil, namespace: nil, **attributes)
  host ||= IPAddress.example
  namespace = Array(namespace)

  attributes[:host] = host

  data_source = namespace.reduce attributes do |hash, namespace|
    { namespace => hash }
  end

  EventStore::HTTP::Connect::Settings.build data_source
end