Class: Artisan::Member
- Inherits:
-
Object
- Object
- Artisan::Member
- Defined in:
- lib/artisan/teams/member.rb
Instance Attribute Summary collapse
-
#member ⇒ Object
Returns the value of attribute member.
Instance Method Summary collapse
- #add_to_assigned_list ⇒ Object
- #add_to_completed_list ⇒ Object
-
#initialize(member) ⇒ Member
constructor
A new instance of Member.
- #remove_from_assigned_list ⇒ Object
- #remove_from_completed_list ⇒ Object
- #remove_from_email_lists ⇒ Object
Constructor Details
#initialize(member) ⇒ Member
Returns a new instance of Member.
6 7 8 |
# File 'lib/artisan/teams/member.rb', line 6 def initialize(member) @member = member end |
Instance Attribute Details
#member ⇒ Object
Returns the value of attribute member.
4 5 6 |
# File 'lib/artisan/teams/member.rb', line 4 def member @member end |
Instance Method Details
#add_to_assigned_list ⇒ Object
17 18 19 20 21 22 |
# File 'lib/artisan/teams/member.rb', line 17 def add_to_assigned_list if !config.nil? config.story_assigned_email_list << @member.user.email config.save! end end |
#add_to_completed_list ⇒ Object
10 11 12 13 14 15 |
# File 'lib/artisan/teams/member.rb', line 10 def add_to_completed_list if !config.nil? config.story_completed_email_list << @member.user.email config.save! end end |
#remove_from_assigned_list ⇒ Object
31 32 33 34 35 36 |
# File 'lib/artisan/teams/member.rb', line 31 def remove_from_assigned_list if !config.nil? config.story_assigned_email_list.delete(@member.user.email) config.save! end end |
#remove_from_completed_list ⇒ Object
24 25 26 27 28 29 |
# File 'lib/artisan/teams/member.rb', line 24 def remove_from_completed_list if !config.nil? config.story_completed_email_list.delete(@member.user.email) config.save! end end |
#remove_from_email_lists ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/artisan/teams/member.rb', line 38 def remove_from_email_lists if !config.nil? config.story_completed_email_list.delete(@member.user.email) config.story_assigned_email_list.delete(@member.user.email) config.save! end end |