Class: SDM::RoleGetResponse

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

Overview

RoleGetResponse returns a requested Role.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, rate_limit: nil, role: nil) ⇒ RoleGetResponse

Returns a new instance of RoleGetResponse.



9852
9853
9854
9855
9856
9857
9858
9859
9860
# File 'lib/models/porcelain.rb', line 9852

def initialize(
  meta: nil,
  rate_limit: nil,
  role: nil
)
  @meta = meta == nil ? nil : meta
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @role = role == nil ? nil : role
end

Instance Attribute Details

#metaObject

Reserved for future use.



9846
9847
9848
# File 'lib/models/porcelain.rb', line 9846

def meta
  @meta
end

#rate_limitObject

Rate limit information.



9848
9849
9850
# File 'lib/models/porcelain.rb', line 9848

def rate_limit
  @rate_limit
end

#roleObject

The requested Role.



9850
9851
9852
# File 'lib/models/porcelain.rb', line 9850

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



9862
9863
9864
9865
9866
9867
9868
# File 'lib/models/porcelain.rb', line 9862

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