Skip to content

Commit

Permalink
Use working example.rb file
Browse files Browse the repository at this point in the history
  • Loading branch information
rewinfrey committed May 12, 2023
1 parent ddcdcff commit 6a4b5b7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions languages/tree-sitter-stack-graphs-ruby/example.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module A
CONST = 1
def a; end
end

module B
include A

def b; end
end

include B

C = Module.new do
def c; end
def b
puts "c"
end
end

self.extend(C)

class D
include C

def calling_a
puts "calling a: #{a}"
end

def calling_c
puts "calling c: #{c}"
end
end

d = D.new
d.b # => "c"

0 comments on commit 6a4b5b7

Please sign in to comment.