Class: Veye::User::ProfilePretty

Inherits:
BasePretty show all
Defined in:
lib/veye/views/user/profile_pretty.rb

Instance Method Summary collapse

Methods inherited from BasePretty

#after, #before

Instance Method Details

#format(results) ⇒ Object



20
21
22
23
# File 'lib/veye/views/user/profile_pretty.rb', line 20

def format(results)
  return if results.nil?
  print_row(results)
end


6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/veye/views/user/profile_pretty.rb', line 6

def print_row(profile, index = 1)
  printf("\t%15s - %s\n",
         "#{profile['username']}".color(:green).bright,
         "#{profile['fullname'].bright}")
  printf("\t%-15s: %s\n", "Email", profile['email'])
  printf("\t%-15s: %s\n", "Plan name", profile['plan_name_id'])
  printf("\t%-15s: %s\n", "Admin", profile['admin'])
  printf("\t%-15s: %s\n", "Deleted", profile['deleted'])
  printf("\t%-15s: %s\n", "New notif.s",
                          "#{profile['notifications']['new']}".bright)
  printf("\t%-15s: %s\n", "Total notif.s",
                          profile['notifications']['total'])
end