Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
prepends modules in front of a class; so method lookup starts with the module
C Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ext/prepend got rid of segfault: if module/class has no name then call it Anon
lib
test
CHANGELOG
README.markdown
Rakefile

README.markdown

Prepend

(c) John Mair (banisterfiend), Asher (Asher) MIT license

Enables modules to be prepended to classes (or other modules).

** This is BETA software and has not yet been thoroughly tested, use at own risk **

install the gem: for testing purposes only gem install prepend

example:

module M
    def hello
        puts "hello!"
    end
end

class A
    def hello
        puts "I feel only hate and loathing"
    end
    prepend M
end

# invoke class method
A.new.hello #=> hello!
Something went wrong with that request. Please try again.