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.
5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 |
# File 'lib/models/porcelain.rb', line 5883 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.
5877 5878 5879 |
# File 'lib/models/porcelain.rb', line 5877 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
5881 5882 5883 |
# File 'lib/models/porcelain.rb', line 5881 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
5879 5880 5881 |
# File 'lib/models/porcelain.rb', line 5879 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
5899 5900 5901 5902 5903 5904 5905 |
# File 'lib/models/porcelain.rb', line 5899 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 |