Class: SDM::ResourceGetResponse
- Inherits:
-
Object
- Object
- SDM::ResourceGetResponse
- Defined in:
- lib/models/porcelain.rb
Overview
ResourceGetResponse returns a requested Resource.
Instance Attribute Summary collapse
-
#meta ⇒ Object
Reserved for future use.
-
#rate_limit ⇒ Object
Rate limit information.
-
#resource ⇒ Object
The requested Resource.
Instance Method Summary collapse
-
#initialize(meta: nil, resource: nil, rate_limit: nil) ⇒ ResourceGetResponse
constructor
A new instance of ResourceGetResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(meta: nil, resource: nil, rate_limit: nil) ⇒ ResourceGetResponse
Returns a new instance of ResourceGetResponse.
4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 |
# File 'lib/models/porcelain.rb', line 4483 def initialize( meta: nil, resource: nil, rate_limit: nil ) if != nil @meta = end if resource != nil @resource = resource end if rate_limit != nil @rate_limit = rate_limit end end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
4477 4478 4479 |
# File 'lib/models/porcelain.rb', line 4477 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
4481 4482 4483 |
# File 'lib/models/porcelain.rb', line 4481 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
4479 4480 4481 |
# File 'lib/models/porcelain.rb', line 4479 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
4499 4500 4501 4502 4503 4504 4505 |
# File 'lib/models/porcelain.rb', line 4499 def to_json( = {}) hash = {} self.instance_variables.each do |var| hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var end hash.to_json end |