Skip to content

Instantly share code, notes, and snippets.

@osyo-manga
Created January 19, 2016 12:21
Show Gist options
  • Select an option

  • Save osyo-manga/2e22d7b3d41f6d3a04df to your computer and use it in GitHub Desktop.

Select an option

Save osyo-manga/2e22d7b3d41f6d3a04df to your computer and use it in GitHub Desktop.
test.rb
require "stitcher"
using Stitcher
class Super
stitcher_require [Fixnum]
def func a
p "Fixnum"
end
end
class X < Super
stitcher_require [Numeric]
def func a
p "Numeric"
end
stitcher_require [Object]
def func a
p "Object"
end
stitcher_require [String]
def func a
p "String"
end
end
x = X.new
x.func 10
x.func 10.0
x.func "10"
x.func []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment