Class: Arpa::Entities::Profile
- Inherits:
-
Object
- Object
- Arpa::Entities::Profile
- Defined in:
- lib/arpa/entities/profile.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#entity_class ⇒ Object
readonly
Returns the value of attribute entity_class.
-
#entity_id ⇒ Object
readonly
Returns the value of attribute entity_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#removed ⇒ Object
readonly
Returns the value of attribute removed.
-
#role_ids ⇒ Object
readonly
Returns the value of attribute role_ids.
-
#roles ⇒ Object
readonly
Returns the value of attribute roles.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Profile
constructor
A new instance of Profile.
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_at ⇒ Object (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 |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/arpa/entities/profile.rb', line 4 def description @description end |
#entity_class ⇒ Object (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_id ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/arpa/entities/profile.rb', line 4 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/arpa/entities/profile.rb', line 4 def name @name end |
#removed ⇒ Object (readonly)
Returns the value of attribute removed.
4 5 6 |
# File 'lib/arpa/entities/profile.rb', line 4 def removed @removed end |
#role_ids ⇒ Object (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 |
#roles ⇒ Object (readonly)
Returns the value of attribute roles.
4 5 6 |
# File 'lib/arpa/entities/profile.rb', line 4 def roles @roles end |
#updated_at ⇒ Object (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 |