Sha256: 6701b57fe047a43569f3e338311e4be6575be57eec8a5fe32a8cd06c8b7cfe3e

Contents?: true

Size: 679 Bytes

Versions: 7

Compression:

Stored size: 679 Bytes

Contents

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

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

    process(command) {
        try {
            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
            }
        } catch (error) {
            return this.process_stack_trace(error, this.constructor.name)
        }

    }
}

module.exports = new GetTypeHandler()

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.1.7 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.5 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.4 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.3 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.2 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js
javonet-ruby-sdk-2.1.1 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/handler/GetTypeHandler.js