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.
11159 11160 11161 11162 11163 11164 11165 11166 11167 |
# File 'lib/models/porcelain.rb', line 11159 def initialize( meta: nil, rate_limit: nil, resource: nil ) @meta = == nil ? nil : @rate_limit = rate_limit == nil ? nil : rate_limit @resource = resource == nil ? nil : resource end |
Instance Attribute Details
#meta ⇒ Object
Reserved for future use.
11153 11154 11155 |
# File 'lib/models/porcelain.rb', line 11153 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
11155 11156 11157 |
# File 'lib/models/porcelain.rb', line 11155 def rate_limit @rate_limit end |
#resource ⇒ Object
The requested Resource.
11157 11158 11159 |
# File 'lib/models/porcelain.rb', line 11157 def resource @resource end |
Instance Method Details
#to_json(options = {}) ⇒ Object
11169 11170 11171 11172 11173 11174 11175 |
# File 'lib/models/porcelain.rb', line 11169 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 |