Class: SDM::ActivityGetResponse
- Inherits:
-
Object
- Object
- SDM::ActivityGetResponse
- Defined in:
- lib/models/porcelain.rb
Overview
ActivityGetResponse returns a requested Activity.
Instance Attribute Summary collapse
-
#activity ⇒ Object
The requested Activity.
-
#meta ⇒ Object
Reserved for future use.
-
#rate_limit ⇒ Object
Rate limit information.
Instance Method Summary collapse
-
#initialize(activity: nil, meta: nil, rate_limit: nil) ⇒ ActivityGetResponse
constructor
A new instance of ActivityGetResponse.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(activity: nil, meta: nil, rate_limit: nil) ⇒ ActivityGetResponse
Returns a new instance of ActivityGetResponse.
1816 1817 1818 1819 1820 1821 1822 1823 1824 |
# File 'lib/models/porcelain.rb', line 1816 def initialize( activity: nil, meta: nil, rate_limit: nil ) @activity = activity == nil ? nil : activity @meta = == nil ? nil : @rate_limit = rate_limit == nil ? nil : rate_limit end |
Instance Attribute Details
#activity ⇒ Object
The requested Activity.
1810 1811 1812 |
# File 'lib/models/porcelain.rb', line 1810 def activity @activity end |
#meta ⇒ Object
Reserved for future use.
1812 1813 1814 |
# File 'lib/models/porcelain.rb', line 1812 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
1814 1815 1816 |
# File 'lib/models/porcelain.rb', line 1814 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1826 1827 1828 1829 1830 1831 1832 |
# File 'lib/models/porcelain.rb', line 1826 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 |