Skip to content

Instantly share code, notes, and snippets.

@skatenerd
Last active April 13, 2016 16:56
Show Gist options
  • Save skatenerd/75306c4302e963f00c9fc92953cce2e8 to your computer and use it in GitHub Desktop.
Save skatenerd/75306c4302e963f00c9fc92953cce2e8 to your computer and use it in GitHub Desktop.
what's gonna happen?
class Foo
def yes
puts "BORING"
end
end
class Bar
def self.go(x)
puts x.yes
end
end
module Refiner
refine Foo do
def yes
puts "GOT IT!"
end
end
end
class Test
using Refiner
def self.execute
puts Foo.new.yes
Bar.go(Foo.new)
end
end
Test.execute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment