summaryrefslogtreecommitdiff
path: root/lib/chef/org.rb
diff options
context:
space:
mode:
authorSteven Danna <steve@opscode.com>2014-12-02 12:27:14 +0000
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-25 14:06:52 -0800
commit70f7314af9bd65d7752773cd492e68963750e2fe (patch)
tree9313a41f7022fc1fe9e73a5fe9f8d01f4a9c30f5 /lib/chef/org.rb
parent73b76328d81f43575eeca5bf8574f0644cfab710 (diff)
downloadchef-70f7314af9bd65d7752773cd492e68963750e2fe.tar.gz
Make name argument mandatory for Chef::Org.new
Diffstat (limited to 'lib/chef/org.rb')
-rw-r--r--lib/chef/org.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/chef/org.rb b/lib/chef/org.rb
index 9a4f7d93ac..2868b36952 100644
--- a/lib/chef/org.rb
+++ b/lib/chef/org.rb
@@ -7,7 +7,7 @@ class Chef
include Chef::Mixin::ParamsValidate
- def initialize(name='')
+ def initialize(name)
@name = name
@full_name = ''
# The Chef API returns the private key of the validator
@@ -95,8 +95,7 @@ class Chef
# Class methods
def self.from_hash(org_hash)
- org = Chef::Org.new
- org.name org_hash['name']
+ org = Chef::Org.new(org_hash['name'])
org.full_name org_hash['full_name']
org.private_key org_hash['private_key'] if org_hash.key?('private_key')
org.guid org_hash['guid'] if org_hash.key?('guid')