Class: LayMeOut::UserDetails
- Inherits:
-
Object
- Object
- LayMeOut::UserDetails
- Defined in:
- app/models/lay_me_out/user_details.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(attr) ⇒ UserDetails
constructor
A new instance of UserDetails.
- #links ⇒ Object
- #profile_picture ⇒ Object
Constructor Details
#initialize(attr) ⇒ UserDetails
Returns a new instance of UserDetails.
3 4 5 6 7 8 |
# File 'app/models/lay_me_out/user_details.rb', line 3 def initialize(attr) @name = attr.fetch(:name) @position = attr[:position] @links = attr[:links] @profile_picture = attr[:profile_picture] end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
10 11 12 |
# File 'app/models/lay_me_out/user_details.rb', line 10 def name @name end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
10 11 12 |
# File 'app/models/lay_me_out/user_details.rb', line 10 def position @position end |
Instance Method Details
#links ⇒ Object
16 17 18 |
# File 'app/models/lay_me_out/user_details.rb', line 16 def links @links ||= {} end |
#profile_picture ⇒ Object
12 13 14 |
# File 'app/models/lay_me_out/user_details.rb', line 12 def profile_picture @profile_picture ||= 'lay_me_out/missing_profile.png' end |