Ruby

Files
.rb
Formats as
RuboCop
Lints
Every rule that reads its code
In ur.toml
[format.ruby]

Formatted

cart.rb, as written
# What a cart costs.
def subtotal(items)
    items.sum { |item| item.price*item.quantity }
end
def label(item) = item.name+" x"+item.quantity.to_s
ur format --style rubocop cart.rb
# What a cart costs.
def subtotal(items)
  items.sum { |item| item.price * item.quantity }
end

def label(item) = item.name + " x" + item.quantity.to_s

Try it in the playground →

Versions

Ur reads Ruby as the profiles below name it. Name the versions a project targets in target; without it, Ur reads ruby-4.0.

ProfileDialect
ruby-3.3CRuby
ruby-3.4CRuby
ruby-4.0CRuby