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.



8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
# File 'lib/models/porcelain.rb', line 8555

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.



8545
8546
8547
# File 'lib/models/porcelain.rb', line 8545

def accounts
  @accounts
end

#approval_flowsObject

The affected approval flows.



8547
8548
8549
# File 'lib/models/porcelain.rb', line 8547

def approval_flows
  @approval_flows
end

#groupObject

The group created from the source role.



8549
8550
8551
# File 'lib/models/porcelain.rb', line 8549

def group
  @group
end

#rate_limitObject

Rate limit information.



8551
8552
8553
# File 'lib/models/porcelain.rb', line 8551

def rate_limit
  @rate_limit
end

#roleObject

The source role.



8553
8554
8555
# File 'lib/models/porcelain.rb', line 8553

def role
  @role
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8569
8570
8571
8572
8573
8574
8575
# File 'lib/models/porcelain.rb', line 8569

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