Class: Artisan::Activity::Formatters::Name

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/activity/formatters/name.rb

Instance Method Summary collapse

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_nameObject



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