summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/client/resource.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/network/client/resource.rb')
-rw-r--r--lib/puppet/network/client/resource.rb17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/puppet/network/client/resource.rb b/lib/puppet/network/client/resource.rb
index bc4a8e53f..ad3210603 100644
--- a/lib/puppet/network/client/resource.rb
+++ b/lib/puppet/network/client/resource.rb
@@ -27,25 +27,12 @@ class Puppet::Network::Client::Resource < Puppet::Network::Client
def describe(type, name, retrieve = false, ignore = false)
Puppet.info "Describing %s[%s]" % [type.to_s.capitalize, name]
text = @driver.describe(type, name, retrieve, ignore, "yaml")
-
- object = nil
- if @local
- object = text
- else
- object = YAML::load(Base64.decode64(text))
- end
-
- return object
+ @local ? text : YAML::load(Base64.decode64(text))
end
def list(type, ignore = false, base = false)
bucket = @driver.list(type, ignore, base, "yaml")
-
- unless @local
- bucket = YAML::load(Base64.decode64(bucket))
- end
-
- return bucket
+ @local ? bucket : YAML::load(Base64.decode64(bucket))
end
end