diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-13 04:52:34 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-13 04:52:34 +0000 |
commit | 5863a0336e1f3bd5e1be85676bb0e7ac7337f2e6 (patch) | |
tree | 7d6cadbf16f19cab8d3c89db3a4b95161241c88b /lib/puppet/transportable.rb | |
parent | 0819e35be74bc997c3a953f05bab874b8d76429d (diff) | |
download | puppet-5863a0336e1f3bd5e1be85676bb0e7ac7337f2e6.tar.gz puppet-5863a0336e1f3bd5e1be85676bb0e7ac7337f2e6.tar.xz puppet-5863a0336e1f3bd5e1be85676bb0e7ac7337f2e6.zip |
Adding initial rails support. One can now store host configurations using ActiveRecord into a database (I have only tested sqlite3). Tomorrow will be the grammars used to retrieve those records for object collection.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1187 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/transportable.rb')
-rw-r--r-- | lib/puppet/transportable.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/puppet/transportable.rb b/lib/puppet/transportable.rb index 3422cd71b..9921aecef 100644 --- a/lib/puppet/transportable.rb +++ b/lib/puppet/transportable.rb @@ -106,6 +106,17 @@ module Puppet @children.each { |c| yield c } end + # Turn our heirarchy into a flat list + def flatten + @children.collect do |obj| + if obj.is_a? Puppet::TransBucket + obj.flatten + else + obj + end + end.flatten + end + def initialize @children = [] end |