Class: SDM::HealthcheckResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rate_limit: nil, status: nil) ⇒ HealthcheckResponse

Returns a new instance of HealthcheckResponse.



9370
9371
9372
9373
9374
9375
9376
# File 'lib/models/porcelain.rb', line 9370

def initialize(
  rate_limit: nil,
  status: nil
)
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @status = status == nil ? [] : status
end

Instance Attribute Details

#rate_limit ⇒ Object

Rate limit information.



9366
9367
9368
# File 'lib/models/porcelain.rb', line 9366

def rate_limit
  @rate_limit
end

#status ⇒ Object

Array of statuses of all nodes serving a secret engine



9368
9369
9370
# File 'lib/models/porcelain.rb', line 9368

def status
  @status
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9378
9379
9380
9381
9382
9383
9384
# File 'lib/models/porcelain.rb', line 9378

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end