Created
May 28, 2013 16:05
-
-
Save crazymykl/5663886 to your computer and use it in GitHub Desktop.
Make Ruby class methods act as staticmethod in Python.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
extend Forwardable | |
def_delegators :'self.class', :foo, :bar | |
def self.foo | |
:foo | |
end | |
def self.bar | |
'bar' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment