Class: SDM::ActivityGetResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

ActivityGetResponse returns a requested Activity.

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = meta == nil ? nil : meta
  @rate_limit = rate_limit == nil ? nil : rate_limit
end

Instance Attribute Details

#activityObject

The requested Activity.



1810
1811
1812
# File 'lib/models/porcelain.rb', line 1810

def activity
  @activity
end

#metaObject

Reserved for future use.



1812
1813
1814
# File 'lib/models/porcelain.rb', line 1812

def meta
  @meta
end

#rate_limitObject

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(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end