Sha256: 37b1289b3c0461a50bba570a307a1f0451198bfec8c7e99b0696af34a0846c05
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
let CommandType = require('./CommandType') class Command { constructor(runtime, commandType, payload = []) { this.runtime = runtime this.commandId = commandType this.payload = payload } createResponse(...args) { return new Command( this.runtime, CommandType.Response, [...args] ) } createReference(...args) { return new Command( this.runtime, CommandType.Reference, [...args] ) } dropFirstPayloadArg() { return new Command( this.runtime, this.commandId, this.payload.slice(1) ) } addArgToPayload(arg) { return new Command( this.runtime, this.commandId, this.payload.concat(arg) ) } appendArgument(arg) { return new Command( this.runtime, this.commandId, [arg].concat(this.payload) ) } } module.exports = Command
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
javonet-ruby-sdk-2.0.1 | lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/utils/Command.js |
javonet-ruby-sdk-2.0.0 | lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/src/utils/Command.js |