Skip to content

Commit b3851d2

Browse files
update sample
1 parent efafcd5 commit b3851d2

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

example/android/app/debug.keystore

-2.2 KB
Binary file not shown.

example/sample.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# examples/ruby/sample.rb
2+
# Minimal Ruby sample so CodeQL can run Ruby analysis
3+
4+
class PaymentExample
5+
def initialize(amount_cents)
6+
@amount_cents = amount_cents
7+
end
8+
9+
def valid?
10+
@amount_cents.to_i > 0
11+
end
12+
13+
def process
14+
raise "Invalid amount" unless valid?
15+
# fake processing
16+
puts "Processing #{@amount_cents} cents..."
17+
end
18+
end
19+
20+
if __FILE__ == $0
21+
PaymentExample.new(100).process
22+
end

0 commit comments

Comments
 (0)