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
Returns a new instance of ResourceGetResponse.
14769 14770 14771 14772 14773 14774 14775 14776 14777 |
# File 'lib/models/porcelain.rb', line 14769 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.
14763 14764 14765 |
# File 'lib/models/porcelain.rb', line 14763 def end |
#rate_limit ⇒ Object
Rate limit information.
14765 14766 14767 |
# File 'lib/models/porcelain.rb', line 14765 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
14767 14768 14769 |
# File 'lib/models/porcelain.rb', line 14767 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
14779 14780 14781 14782 14783 14784 14785 |
# File 'lib/models/porcelain.rb', line 14779 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 |