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, rate_limit: nil, resource: nil) ⇒ ResourceGetResponse
constructor
A new instance of ResourceGetResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(meta: nil, rate_limit: nil, resource: nil) ⇒ ResourceGetResponse
5681 5682 5683 5684 5685 5686 5687 5688 5689 |
# File 'lib/models/porcelain.rb', line 5681 def initialize( meta: nil, rate_limit: nil, resource: nil ) = == nil ? nil : @rate_limit = rate_limit == nil ? nil : rate_limit @resource = resource == nil ? nil : resource end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
5675 5676 5677 |
# File 'lib/models/porcelain.rb', line 5675 def end |
#rate_limit ⇒ Object
Rate limit information.
5677 5678 5679 |
# File 'lib/models/porcelain.rb', line 5677 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
5679 5680 5681 |
# File 'lib/models/porcelain.rb', line 5679 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
5691 5692 5693 5694 5695 5696 5697 |
# File 'lib/models/porcelain.rb', line 5691 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 |