Sha256: 069f09b8ba5e60d1242dcb0119d4a807bf8008f8e8fe50bc19d1b286dccbdf6b

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

module Superhosting
  module CompositeMapper
    def self.new(etc_mapper:, lib_mapper:, web_mapper:)
      klass = case type = etc_mapper.parent.name
        when 'containers' then Container
        when 'sites' then Site
        else raise NetStatus::Exception, { error: :logical_error, code: :mapper_type_not_supported, data: { name: type } }
      end
      klass.new(etc_mapper: etc_mapper, lib_mapper: lib_mapper, web_mapper: web_mapper)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
superhosting-0.0.2 lib/superhosting/composite_mapper.rb