Sha256: ffcbcebb8725ee8bee242dc521b58d3a5dfa4aca4d2bb6685ba7e0a81d611bb3

Contents?: true

Size: 537 Bytes

Versions: 3

Compression:

Stored size: 537 Bytes

Contents

const AbstractHandler = require("./AbstractHandler");

class GetTypeHandler extends AbstractHandler {
    constructor() {
        super()
    }

    process(command) {
        const { payload } = command
        let typeName = payload[0]
        typeName = typeName.replace(".js", "")
        let type = global[typeName]
        if (type == undefined) {
            throw `Cannot load ${typeName}`
        }
        else { 
            return type
        }

        
    }
}

module.exports = new GetTypeHandler()

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.0.4 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.0.1 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.0.0 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/core/handler/GetTypeHandler.js