Sha256: 48da1c65171a98b7497e65f988437b0fae5fd47164de93ebb7ae5a3b94d6a0fa

Contents?: true

Size: 670 Bytes

Versions: 14

Compression:

Stored size: 670 Bytes

Contents

const AbstractHandler = require("./AbstractHandler")

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

    process(command) {
        try {
            const {payload} = command
            const splitted = payload[0].split(".")
            let fieldToGet

            for (let i = 0; i < splitted.length; i++) {
                fieldToGet = !fieldToGet ? global[splitted[i]] : fieldToGet[splitted[i]]
            }
            return fieldToGet

        } catch (error) {
            return this.process_stack_trace(error, this.constructor.name)
        }
    }
}

module.exports = new GetGlobalStaticFieldHandler()

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/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.7 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.6 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.5 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.5 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.4 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.4 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.3 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.3 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.2 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.2 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.1 lib/javonet-ruby-sdk/Binaries/Nodejs/Linux/X64/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.1.1 lib/javonet-ruby-sdk/Binaries/Nodejs/MacOs/X64/core/handler/GetGlobalStaticFieldHandler.js