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.
4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 |
# File 'lib/models/porcelain.rb', line 4876 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.
4870 4871 4872 |
# File 'lib/models/porcelain.rb', line 4870 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
4874 4875 4876 |
# File 'lib/models/porcelain.rb', line 4874 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
4872 4873 4874 |
# File 'lib/models/porcelain.rb', line 4872 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
4892 4893 4894 4895 4896 4897 4898 |
# File 'lib/models/porcelain.rb', line 4892 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 |