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.
1825 1826 1827 1828 1829 1830 1831 1832 1833 |
# File 'lib/models/porcelain.rb', line 1825 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.
1819 1820 1821 |
# File 'lib/models/porcelain.rb', line 1819 def activity @activity end |
#meta ⇒ Object
Reserved for future use.
1821 1822 1823 |
# File 'lib/models/porcelain.rb', line 1821 def @meta end |
#rate_limit ⇒ Object
Rate limit information.
1823 1824 1825 |
# File 'lib/models/porcelain.rb', line 1823 def rate_limit @rate_limit end |
Instance Method Details
#to_json(options = {}) ⇒ Object
1835 1836 1837 1838 1839 1840 1841 |
# File 'lib/models/porcelain.rb', line 1835 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 |