> Hm, does this work in case I have one keyattribute that is not "name"
> (like the fileresource where the keyattribute is "path")?
No, but neither does the existing code. :(
> If not, here is a second suggestion
>
> def self.title_join(hash)
> # extract all parameters that are keya
On Sun, May 22, 2011 at 05:56:29PM -0700, Dan Bode wrote:
> I just finished something very similar:
>
>
> def self.title_join(hash)
> "#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}"
> end
>
> where the default case was:
>
> + def self.title_join(hash)
> +case key_attributes.length
> I just finished something very similar:
>
>
> def self.title_join(hash)
> "#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}"
> end
>
> where the default case was:
>
> + def self.title_join(hash)
> +case key_attributes.length
> +when 0,1; hash[:name]
> +else
> + Puppet
I just finished something very similar:
def self.title_join(hash)
"#{hash[:domain]}/#{hash[:type]}/#{hash[:item]}"
end
where the default case was:
+ def self.title_join(hash)
+case key_attributes.length
+when 0,1; hash[:name]
+else
+ Puppet.warning('you should specify
So what if we replaced this:
910 title = hash.delete(:title)
911 title ||= hash[:name]
912 title ||= hash[key_attributes.first] if key_attributes.length == 1
With something that took an array of arrays of strings and symbols and
"reconstitutes" the title from the first one that matches:
tit
On Sun, May 22, 2011 at 4:42 PM, markus wrote:
>
> > It actually seems to get a little sticky for purging, below I am
> > outlining how it works, I was just curious if anyone has spent time
> > thinking about this use case before and how it should work:
> >
> > As far as I can tell, the title_pat
> It actually seems to get a little sticky for purging, below I am
> outlining how it works, I was just curious if anyone has spent time
> thinking about this use case before and how it should work:
>
> As far as I can tell, the title_patterns can only map in one direction
> title->parameters
Th
Hi all,
I have been working on getting composite namevars to work with parsedfile.
It actually seems to get a little sticky for purging, below I am outlining
how it works, I was just curious if anyone has spent time thinking about
this use case before and how it should work:
As far as I can tell