class AccountPermission

Summarize account editing permissions

Attributes

can_edit_person[RW]
person[RW]
person_can_edit[RW]

Public Class Methods

new(person, can_edit_person, person_can_edit) click to toggle source
# File app/models/account_permission.rb, line 5
def initialize(person, can_edit_person, person_can_edit)
  @person = person
  @can_edit_person = can_edit_person
  @person_can_edit = person_can_edit
end

Public Instance Methods

can_edit_person?() click to toggle source

“owner” can edit the AccountPermission person

# File app/models/account_permission.rb, line 12
def can_edit_person?
  @can_edit_person
end
person_can_edit?() click to toggle source

AccountPermission person can edit "owner"

# File app/models/account_permission.rb, line 17
def person_can_edit?
  @person_can_edit
end
to_s() click to toggle source
# File app/models/account_permission.rb, line 21
def to_s
  "#<AccountPermission #{person.try(:id)} #{@can_edit_person} #{@person_can_edit}>"
end