1
0
mirror of https://github.com/helix-editor/helix synced 2026-07-25 22:40:56 +02:00
Files
Blaž Hrastnik cd6a852c9e Add indent corpus
This will be used by the cargo indent-check xtask to validate queries,
similar to the existing indent tests in helix-core.
2026-06-07 21:29:01 +09:00

43 lines
557 B
Ruby

module Greeter
class Hello
def initialize(name)
@name = name
end
def greet
if @name
puts "Hello, #{@name}"
elsif @other
puts "Hi"
else
puts "Hello"
end
end
def classify(x)
case x
when 1
"one"
else
"many"
end
end
def safe
begin
risky
rescue => e
handle(e)
ensure
cleanup
end
end
def each_item
[1, 2, 3].each do |item|
process(item)
end
end
end
end