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.
5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 |
# File 'lib/models/porcelain.rb', line 5342 def initialize( meta: nil, rate_limit: nil, resource: nil ) if != nil @meta = 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.
5336 5337 5338 |
# File 'lib/models/porcelain.rb', line 5336 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
5338 5339 5340 |
# File 'lib/models/porcelain.rb', line 5338 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
5340 5341 5342 |
# File 'lib/models/porcelain.rb', line 5340 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
5358 5359 5360 5361 5362 5363 5364 |
# File 'lib/models/porcelain.rb', line 5358 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 |