Class: Artisan::Activity::Formatters::Name
- Inherits:
-
Object
- Object
- Artisan::Activity::Formatters::Name
- Defined in:
- lib/artisan/activity/formatters/name.rb
Instance Method Summary collapse
- #full_name ⇒ Object
-
#initialize(change) ⇒ Name
constructor
A new instance of Name.
Constructor Details
#initialize(change) ⇒ Name
Returns a new instance of Name.
7 8 9 |
# File 'lib/artisan/activity/formatters/name.rb', line 7 def initialize(change) @change = change end |
Instance Method Details
#full_name ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/artisan/activity/formatters/name.rb', line 11 def full_name unless @change.user_id == nil return User.find(@change.user_id).full_name else return "Unknown" end end |