Skip to content

Instantly share code, notes, and snippets.

@crazymykl
Created May 28, 2013 16:05
Show Gist options
  • Save crazymykl/5663886 to your computer and use it in GitHub Desktop.
Save crazymykl/5663886 to your computer and use it in GitHub Desktop.
Make Ruby class methods act as staticmethod in Python.
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