Class: SDM::GroupFromRole

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(accounts: nil, approval_flows: nil, group: nil, rate_limit: nil, role: nil) ⇒ GroupFromRole

Returns a new instance of GroupFromRole.



8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
# File 'lib/models/porcelain.rb', line 8201

def initialize(
  accounts: nil,
  approval_flows: nil,
  group: nil,
  rate_limit: nil,
  role: nil
)
  @accounts = accounts == nil ? [] : accounts
  @approval_flows = approval_flows == nil ? [] : approval_flows
  @group = group == nil ? nil : group
  @rate_limit = rate_limit == nil ? nil : rate_limit
  @role = role == nil ? nil : role
end

Instance Attribute Details

#accountsObject

The migrated Accounts.



8191
8192
8193
# File 'lib/models/porcelain.rb', line 8191

def accounts
  @accounts
end

#approval_flowsObject

The affected approval flows.



8193
8194
8195
# File 'lib/models/porcelain.rb', line 8193

def approval_flows
  @approval_flows
end

#groupObject

The group created from the source role.



8195
8196
8197
# File 'lib/models/porcelain.rb', line 8195

def group
  @group
end

#rate_limitObject

Rate limit information.



8197
8198
8199
# File 'lib/models/porcelain.rb', line 8197

def rate_limit
  @rate_limit
end

#roleObject

The source role.



8199
8200
8201
# File 'lib/models/porcelain.rb', line 8199

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8215
8216
8217
8218
8219
8220
8221
# File 'lib/models/porcelain.rb', line 8215

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