Method: Chef::OpenIDRegistration#to_json

Defined in:
lib/chef/openid_registration.rb

#to_json(*a) ⇒ Object

Serialize this object as a hash



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/chef/openid_registration.rb', line 102

def to_json(*a)
  attributes = Hash.new
  recipes = Array.new
  result = {
    'name' => @name,
    'json_class' => self.class.name,
    'salt' => @salt,
    'password' => @password,
    'validated' => @validated,
    'admin' => @admin,
    'chef_type' => 'openid_registration',
  }
  result["_rev"] = @couchdb_rev if @couchdb_rev
  result.to_json(*a)
end