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.
3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 |
# File 'lib/models/porcelain.rb', line 3911 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.
3905 3906 3907 |
# File 'lib/models/porcelain.rb', line 3905 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
3909 3910 3911 |
# File 'lib/models/porcelain.rb', line 3909 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
3907 3908 3909 |
# File 'lib/models/porcelain.rb', line 3907 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
3927 3928 3929 3930 3931 3932 3933 |
# File 'lib/models/porcelain.rb', line 3927 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 |