Created
August 7, 2010 04:37
-
-
Save mdaisuke/512437 to your computer and use it in GitHub Desktop.
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 Sample | |
attr_accessor :method | |
def initialize | |
@method = :get | |
end | |
def self.get | |
new.perform | |
end | |
def perform | |
send("perform_#{method}") | |
end | |
private | |
def perform_get | |
puts "perform_get is called" | |
end | |
end | |
Sample.get |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment