Given the manifest:

> $a = 1
> $b = 1 + 0
> $c = 1.1
> $d = 1.1 + 0
> $result = inline_template("
> a <%= @a.class %> <%= @a %>
> b <%= @b.class %> <%= @b %>
> c <%= @c.class %> <%= @c %>
> d <%= @d.class %> <%= @d %>
> ")
> notify {
>     $result:
> }



The output is:

> a String 1
> b Fixnum 1
> c String 1.1
> d Float 1.1



Is this working as intended?

How can I identify number types within the template without adding "+ 0" on 
the manifest? I'm aware that it's not a good idea to duck-type on templates 
but I'm still wondering.


--
Claudio

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to