summaryrefslogtreecommitdiffstats
path: root/lib/puppet/util/rdoc/code_objects.rb
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-03-28 21:37:05 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-02 15:51:23 -0700
commit05b434dca10bbc18d794358a9d08db89a46424f9 (patch)
tree1191c7fa664da4795a489c7dd08969e0757f9a1e /lib/puppet/util/rdoc/code_objects.rb
parenta3f5f974251e14f02e8f83e12f4589581dd21828 (diff)
downloadpuppet-05b434dca10bbc18d794358a9d08db89a46424f9.tar.gz
puppet-05b434dca10bbc18d794358a9d08db89a46424f9.tar.xz
puppet-05b434dca10bbc18d794358a9d08db89a46424f9.zip
(#6758) Pass options as an argument to string actions.
Earlier in their implementation the String prototype would set global state on a String object to reflect options set on the command line. As we move strings away from a CLI-only prototype, this becomes troublesome because we can easily have, for example, HTTP access to a string, which means load balancers can really make this confusing. It also encourages global state pollution, where one invocation can adversely influence another. A better approach is that we pass options to the string action invocation directly; this makes the interaction stateless. Changes required to your code to adapt to the new world: - action(:foo) do |some, args| + action(:foo) do |some, args, options={}| if options[:whatever] then Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>
Diffstat (limited to 'lib/puppet/util/rdoc/code_objects.rb')
0 files changed, 0 insertions, 0 deletions