2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/pry/send_tweet/renderers/user_renderer.rb', line 2
def render_user(user)
title = "@#{user.screen_name} ( https://twitter.com/#{user.screen_name} )"
body = CGI.unescapeHTML <<-USER.each_line.map(&:strip).join("\n")
#{bold("Tweets")} #{user.}
#{bold("Followers")} #{user.followers_count}
#{bold("Following")} #{user.friends_count}
#{user.description}
USER
height = body.lines.count > box_height ? body.lines.count : box_height
TTY::Box.frame(
height: height,
width: box_width,
title: {top_left: title}
) { body }.to_s
end
|