Parent Directory | Revision Log
rename the file, so we have 1 function per file
1 | require 'puppet/rails' |
2 | |
3 | # function : |
4 | # list_exported_ressources($resource) |
5 | # -> return a array of title |
6 | |
7 | module Puppet::Parser::Functions |
8 | newfunction(:list_exported_ressources, :type => :rvalue) do |args| |
9 | exported_type = args[0] |
10 | #TODO manage tags |
11 | Puppet::Rails.connect() |
12 | # TODO use find_each |
13 | return Puppet::Rails::Resource.find(:all, |
14 | :conditions => { :exported => true, |
15 | :restype => exported_type }).map { |r| r.title } |
16 | end |
17 | end |
ViewVC Help | |
Powered by ViewVC 1.1.30 |