Class: Viberator::Author

Inherits:
Record
  • Object
show all
Defined in:
lib/viberator/author.rb

Instance Method Summary collapse

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from Viberator::Record

Instance Method Details

#avatarObject



6
7
8
9
# File 'lib/viberator/author.rb', line 6

def avatar
  return if @attrs[:AvatarPath].to_s.strip.empty?
  Pathname.new @attrs[:AvatarPath]
end

#nameObject



11
12
13
14
# File 'lib/viberator/author.rb', line 11

def name
  return @attrs[:Number] if @attrs[:ClientName].to_s.strip.empty?
  "#{@attrs[:ClientName].to_s.strip} (#{@attrs[:Number]})"
end