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.



1642
1643
1644
1645
1646
1647
1648
1649
1650
# File 'lib/models/porcelain.rb', line 1642

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.



1636
1637
1638
# File 'lib/models/porcelain.rb', line 1636

def activity
  @activity
end

#metaObject

Reserved for future use.



1638
1639
1640
# File 'lib/models/porcelain.rb', line 1638

def meta
  @meta
end

#rate_limitObject

Rate limit information.



1640
1641
1642
# File 'lib/models/porcelain.rb', line 1640

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



1652
1653
1654
1655
1656
1657
1658
# File 'lib/models/porcelain.rb', line 1652

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