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.
6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 |
# File 'lib/models/porcelain.rb', line 6064 def initialize( meta: nil, rate_limit: nil, resource: nil ) if != nil = end if rate_limit != nil @rate_limit = rate_limit end if resource != nil @resource = resource end end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
6058 6059 6060 |
# File 'lib/models/porcelain.rb', line 6058 def end |
#rate_limit ⇒ Object
Rate limit information.
6060 6061 6062 |
# File 'lib/models/porcelain.rb', line 6060 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
6062 6063 6064 |
# File 'lib/models/porcelain.rb', line 6062 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
6080 6081 6082 6083 6084 6085 6086 |
# File 'lib/models/porcelain.rb', line 6080 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 |