Issue #6780 has been reported by Pieter van de Bruggen.
----------------------------------------
Feature #6780: Implement type checking/coercion for action args
https://projects.puppetlabs.com/issues/6780
Author: Pieter van de Bruggen
Status: Accepted
Priority: Normal
Assignee:
Category: interfaces
Target version: 2.6.x
Affected Puppet version:
Keywords:
Branch:
The expectation is that actions should be able to transparently have
typechecked signatures, and that automatic coercions will happen for certain
argument types.
Consider:
Puppet::Interface::Catalog.action :apply, [Puppet::Resource::Catalog] do
|catalog|
# `catalog` is expected to be a Puppet::Resource::Catalog, and will be
automatically coerced
# into one if passed certain types (e.g. a String from the command line)
end
Puppet::Interface::Facts.action :find, [String] do |query| ... end
This makes interfacing the rich type system of Ruby with the command line's
simple String-based interface simple.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.