Sha256: 40f3e5df0cf7b7fc4ea263b2479a3b26c5caecbfc7ec3391e952d7efdb44c83e

Contents?: true

Size: 654 Bytes

Versions: 14

Compression:

Stored size: 654 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

14 entries across 7 versions & 1 rubygems

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