Module: WO::Response::Format::Timeline

Included in:
WO::Response
Defined in:
lib/wo/response/format/timeline.rb

Instance Method Summary collapse

Instance Method Details

#to_timelineObject

TODO: refactor TODO: handle colorize



8
9
10
11
12
13
14
15
16
# File 'lib/wo/response/format/timeline.rb', line 8

def to_timeline
  to_json["users"].map do |user|
    user_name = user["name"]
    repo_branch = "#{user["recent_repo"]}/#{user["recent_branch"]}"
    time = user["time_ago"]

    sprintf(format, user_name, repo_branch, time)
  end
end