Sha256: 90509e65d791d063ca63f6d254e06e9f5702a58bff5355428ee3c778bfa7128b

Contents?: true

Size: 537 Bytes

Versions: 3

Compression:

Stored size: 537 Bytes

Contents

const AbstractHandler = require("./AbstractHandler")

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

    process(command) {
        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
    }
}

module.exports = new GetGlobalStaticFieldHandler()

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/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.0.1 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/core/handler/GetGlobalStaticFieldHandler.js
javonet-ruby-sdk-2.0.0 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/core/handler/GetGlobalStaticFieldHandler.js