Method: OpenIDConnect::Client::Registrar#as_json

Defined in:
lib/openid_connect/client/registrar.rb

#as_json(options = {}) ⇒ Object



89
90
91
92
93
94
95
96
# File 'lib/openid_connect/client/registrar.rb', line 89

def as_json(options = {})
  validate!
  self.class..inject({}) do |hash, _attr_|
    value = self.send _attr_
    hash.merge! _attr_ => value unless value.nil?
    hash
  end
end