diff options
| author | Ed Slocomb <edslocomb@gmail.com> | 2023-08-11 17:25:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-11 17:25:58 -0700 |
| commit | 706d6bd347b6d25a54148666ea4d33f16b3915c6 (patch) | |
| tree | ed4e035adf404946b7690031fa5227579a4ba83b /test/formatters/samplecode/ruby-standard | |
| parent | 881b5e80a8e4f6e1376ed8700dc102813b3af46c (diff) | |
Add ruby-standard formatter (#201)
There are *so many* opinionated no-config ruby formatters ;)
Diffstat (limited to 'test/formatters/samplecode/ruby-standard')
| l--------- | test/formatters/samplecode/ruby-standard/in.rb | 1 | ||||
| -rw-r--r-- | test/formatters/samplecode/ruby-standard/out.rb | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/formatters/samplecode/ruby-standard/in.rb b/test/formatters/samplecode/ruby-standard/in.rb new file mode 120000 index 0000000..2881c83 --- /dev/null +++ b/test/formatters/samplecode/ruby-standard/in.rb @@ -0,0 +1 @@ +../prettier-ruby/in.rb
\ No newline at end of file diff --git a/test/formatters/samplecode/ruby-standard/out.rb b/test/formatters/samplecode/ruby-standard/out.rb new file mode 100644 index 0000000..de98107 --- /dev/null +++ b/test/formatters/samplecode/ruby-standard/out.rb @@ -0,0 +1,16 @@ +d = [30644250780, 9003106878, + 30636278846, 66641217692, 4501790980, + 671_24_603036, 131_61973916, 66_606629_920, + 30642677916, 30643069058]; a, s = [], $*[0] +s.each_byte { |b| + a << ("%036b" % d[b + .chr.to_i]).scan(/\d{6}/) +} +a.transpose.each { |a| + a.join.each_byte { |i| + print (i == 49) ? \ + ($*[1] || "#") \ + :32.chr + } + puts +} |
