Simple class to manage compliant results from MCollective::RPC agents
Currently it just fakes Hash behaviour to the result to remain backward compatible but it also knows which agent and action produced it so you can associate results to a DDL
(Not documented)
# File lib/mcollective/rpc/result.rb, line 19
19: def [](idx)
20: @results[idx]
21: end
(Not documented)
# File lib/mcollective/rpc/result.rb, line 23
23: def []=(idx, item)
24: @results[idx] = item
25: end
(Not documented)
# File lib/mcollective/rpc/result.rb, line 31
31: def each
32: @results.each_pair {|k,v| yield(k,v) }
33: end
(Not documented)
# File lib/mcollective/rpc/result.rb, line 27
27: def fetch(key, default)
28: @results.fetch(key, default)
29: end
(Not documented)
# File lib/mcollective/rpc/result.rb, line 35
35: def to_json(*a)
36: {:agent => @agent,
37: :action => @action,
38: :sender => @results[:sender],
39: :statuscode => @results[:statuscode],
40: :statusmsg => @results[:statusmsg],
41: :data => @results[:data]}.to_json(*a)
42: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.