Sha256: f5f27606c83ac30771ba0850f2e0c4468cbe311292a619b7bf8350f37584e689
Contents?: true
Size: 959 Bytes
Versions: 18
Compression:
Stored size: 959 Bytes
Contents
require 'nrser/refinements' using NRSER module QB module Util module Interop class << self # @todo Document receive method. # # @param [type] arg_name # @todo Add name param description. # # @return [return_type] # @todo Document return value. # def receive # method body yaml = $stdin.read payload = YAML.load yaml data = payload.fetch 'data' method = payload.fetch 'method' args = payload['args'] || [] kwds = payload['kwds'] || {} args << kwds.symbolize_keys unless kwds.empty? obj = if data.is_a?(Hash) && data.key?(NRSER::Meta::Props::CLASS_KEY) NRSER::Meta::Props.from_data data else data end result = obj.send method, *args $stdout.write result.to_yaml end # #receive end # class << self end # module Interop end # module Util end # module QB
Version data entries
18 entries across 18 versions & 1 rubygems