Method: Chef::UserV1#to_h

Defined in:
lib/chef/user_v1.rb

#to_hObject Also known as: to_hash



115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/chef/user_v1.rb', line 115

def to_h
  result = {
    "username" => @username,
  }
  result["display_name"] = @display_name unless @display_name.nil?
  result["first_name"] = @first_name unless @first_name.nil?
  result["middle_name"] = @middle_name unless @middle_name.nil?
  result["last_name"] = @last_name unless @last_name.nil?
  result["email"] = @email unless @email.nil?
  result["password"] = @password unless @password.nil?
  result["public_key"] = @public_key unless @public_key.nil?
  result["private_key"] = @private_key unless @private_key.nil?
  result["create_key"] = @create_key unless @create_key.nil?
  result
end