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.



11170
11171
11172
11173
11174
11175
11176
11177
11178
# File 'lib/models/porcelain.rb', line 11170

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.



11164
11165
11166
# File 'lib/models/porcelain.rb', line 11164

def meta
  @meta
end

#rate_limitObject

Rate limit information.



11166
11167
11168
# File 'lib/models/porcelain.rb', line 11166

def rate_limit
  @rate_limit
end

#roleObject

The requested Role.



11168
11169
11170
# File 'lib/models/porcelain.rb', line 11168

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



11180
11181
11182
11183
11184
11185
11186
# File 'lib/models/porcelain.rb', line 11180

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