Browse Source

to offset indentation for cleaner outputs

master
apoc 2 weeks ago
parent
commit
78bcabc926
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      client.rb

+ 3
- 1
client.rb View File

@@ -124,10 +124,12 @@ class Client
slice_age = Time.now.to_i - Time.parse( raw.first['created_at'] ).to_i
entry_frequence = "%.9f" % ( raw.count.to_f / slice_age )

offsets = raw.first['x']

raw.each do |problem|

resolved = problem['solution'].class == String
problem['indent'] = (0..problem['x']).to_a.map { |_e| ' ' }.join
problem['indent'] = (0..(problem['x'] - offsets)).to_a.map { |_e| ' ' }.join

problem['symbol'] = resolved ?
'x' : '○'

Loading…
Cancel
Save