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.



8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
# File 'lib/models/porcelain.rb', line 8480

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.



8470
8471
8472
# File 'lib/models/porcelain.rb', line 8470

def accounts
  @accounts
end

#approval_flowsObject

The affected approval flows.



8472
8473
8474
# File 'lib/models/porcelain.rb', line 8472

def approval_flows
  @approval_flows
end

#groupObject

The group created from the source role.



8474
8475
8476
# File 'lib/models/porcelain.rb', line 8474

def group
  @group
end

#rate_limitObject

Rate limit information.



8476
8477
8478
# File 'lib/models/porcelain.rb', line 8476

def rate_limit
  @rate_limit
end

#roleObject

The source role.



8478
8479
8480
# File 'lib/models/porcelain.rb', line 8478

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8494
8495
8496
8497
8498
8499
8500
# File 'lib/models/porcelain.rb', line 8494

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