Skip to content

Instantly share code, notes, and snippets.

@alfie-max
Created October 23, 2017 15:29
Show Gist options
  • Select an option

  • Save alfie-max/98ae9aeb8bee273b6346e3414a24b7b5 to your computer and use it in GitHub Desktop.

Select an option

Save alfie-max/98ae9aeb8bee273b6346e3414a24b7b5 to your computer and use it in GitHub Desktop.

Revisions

  1. alfie-max created this gist Oct 23, 2017.
    20 changes: 20 additions & 0 deletions how_does_this_not_work.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    module Foo
    def self.included(base)
    base.class_eval do
    def self.method_injected_by_foo
    ...
    end
    end
    end
    end

    module Bar
    include Foo
    def self.included(base)
    base.method_injected_by_foo
    end
    end

    class Host
    include Bar
    end