Post History
Ruby, 67 65 bytes -2 from Razetime ->s,a{[s.center(l=a.map(&:size).max),*a,"BOTTOM TEXT".center(l)]} Takes the art and outputs as a list of lines. Try it online!
Answer
#2: Post edited
# [Ruby], 67 bytes- ```ruby
->s,a{l=a.map(&:size).max[s.center(l),*a,"BOTTOM TEXT".center(l)]}- ```
Takes the art and returns the result as an array of string.[Try it online!][TIO-krss358k]- [Ruby]: https://www.ruby-lang.org/
[TIO-krss358k]: https://tio.run/##ZZDBSgMxEIbveYoxB5PIbnKXrofCQi9SkD0IRrdRt6US22Wzxarx2deMzejBHMI/33zMwAyHx/dpXU3lVSjcp6@cfnW9PL8M249OpXxkd0E/dbuxG6RXxYUr@HzZNMtraOrbhv@17r8mN4xQwWxWikV9Uwsder8dJbc7rhjk1/4kXZYCIkbTtu0DRMhUk6hOzOBnM0xFgmZ1qkR20RNpHNmkW1qZp0OkOZbcrBgbaW0iRpTprbBnCMcYSbDwK0tJFON/FyN72QScZFqZIUaGB2Jjd8SD8UXn/b6At/3gn8846w9jgLWW2C7STdX0DQ "Ruby – Try It Online"
- # [Ruby], <del>67</del> 65 bytes
- [-2 from Razetime](https://codegolf.codidact.com/comments/thread/3782)
- ```ruby
- ->s,a{[s.center(l=a.map(&:size).max),*a,"BOTTOM TEXT".center(l)]}
- ```
- Takes the art and outputs as a list of lines.
- [Try it online!][TIO-kru3xlv2]
- [Ruby]: https://www.ruby-lang.org/
- [TIO-kru3xlv2]: https://tio.run/##ZZDBSgMxEIbveYoxB5PIbnKXbg@FhV6kIHsQjKZRt1JZ22Wzxarx2deMzfTiHMI/Xz5mYIbD0@e0qaZyHgr/fR/0c7sb20F2ldfvvpeX12H71aqUj6q48gVfrJpmdQNNfdfws6wefiY/jFDBbFaKZX1bCx36bjtKbndcMcjl/pIuSwERo3HOPUKETDWJ6sQMPjbD1CRo1qdOZBc9kcaRTbqllXk6RJpjyc2KsZHWJmJEmWqNf4ZwjJEEC2dZSqIY/7sY2dtrwEnGyQwxMjwQG9sjHowv267bF/CxH7qXC876wxhgoyV@F@mmavoF "Ruby – Try It Online"
#1: Initial revision
# [Ruby], 67 bytes ```ruby ->s,a{l=a.map(&:size).max [s.center(l),*a,"BOTTOM TEXT".center(l)]} ``` Takes the art and returns the result as an array of string. [Try it online!][TIO-krss358k] [Ruby]: https://www.ruby-lang.org/ [TIO-krss358k]: https://tio.run/##ZZDBSgMxEIbveYoxB5PIbnKXrofCQi9SkD0IRrdRt6US22Wzxarx2deMzejBHMI/33zMwAyHx/dpXU3lVSjcp6@cfnW9PL8M249OpXxkd0E/dbuxG6RXxYUr@HzZNMtraOrbhv@17r8mN4xQwWxWikV9Uwsder8dJbc7rhjk1/4kXZYCIkbTtu0DRMhUk6hOzOBnM0xFgmZ1qkR20RNpHNmkW1qZp0OkOZbcrBgbaW0iRpTprbBnCMcYSbDwK0tJFON/FyN72QScZFqZIUaGB2Jjd8SD8UXn/b6At/3gn8846w9jgLWW2C7STdX0DQ "Ruby – Try It Online"