diff options
| author | Luke Kanies <luke@reductivelabs.com> | 2010-01-08 17:22:49 -0800 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 86cf226916f793277e2405711993d7ccbc4e7965 (patch) | |
| tree | ecd7132a698ce67806b391e75ba01cb8ddc92318 /lib/puppet/resource | |
| parent | 9d5ba413a7134fdffdcae5cefde2dd15cd1de19a (diff) | |
| download | puppet-86cf226916f793277e2405711993d7ccbc4e7965.tar.gz puppet-86cf226916f793277e2405711993d7ccbc4e7965.tar.xz puppet-86cf226916f793277e2405711993d7ccbc4e7965.zip | |
Adding virtual and exported resource support to the DSL
Also changed the internals - we're no longer using
Resource instances with the ruby block, instead
we're using a simple new class. We had to do this
because Resource has too many methods - e.g.,
'file' returned the file name rather than
created a new resource type.
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
Diffstat (limited to 'lib/puppet/resource')
| -rw-r--r-- | lib/puppet/resource/type.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/puppet/resource/type.rb b/lib/puppet/resource/type.rb index 2acb990ce..1192a1a9c 100644 --- a/lib/puppet/resource/type.rb +++ b/lib/puppet/resource/type.rb @@ -220,11 +220,7 @@ class Puppet::Resource::Type end def evaluate_ruby_code(resource, scope) - resource.extend(Puppet::DSL::ResourceAPI) - - resource.set_instance_variables - - resource.instance_eval(&ruby_code) + Puppet::DSL::ResourceAPI.new(resource, scope, ruby_code).evaluate end # Split an fq name into a namespace and name |
