Class: Arpa::Entities::Profile

Inherits:
Object
  • Object
show all
Defined in:
lib/arpa/entities/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Profile

Returns a new instance of Profile.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/arpa/entities/profile.rb', line 7

def initialize(attrs = {})
  attrs = attrs.with_indifferent_access

  @id           = attrs[:id]
  @name         = attrs[:name]
  @description  = attrs[:description]
  @role_ids     = default_value_to_nil_or_empty(attrs[:role_ids], [])
  @roles        = default_value_to_nil_or_empty(attrs[:roles], [])
  @entity_id    = attrs[:entity_id]
  @entity_class = attrs[:entity_class]
  @created_at   = attrs[:created_at]
  @updated_at   = attrs[:updated_at]
  @removed      = default_value_to_nil_or_empty(attrs[:removed], false)
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def description
  @description
end

#entity_classObject (readonly)

Returns the value of attribute entity_class.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def entity_class
  @entity_class
end

#entity_idObject (readonly)

Returns the value of attribute entity_id.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def entity_id
  @entity_id
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def name
  @name
end

#removedObject (readonly)

Returns the value of attribute removed.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def removed
  @removed
end

#role_idsObject (readonly)

Returns the value of attribute role_ids.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def role_ids
  @role_ids
end

#rolesObject (readonly)

Returns the value of attribute roles.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def roles
  @roles
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/arpa/entities/profile.rb', line 4

def updated_at
  @updated_at
end