/ Published in: Ruby
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
# Extend class methods for any ruby class
class NameofClass
class <<self
# create class methods below
def magic
#insert your magic code here
end
end
end
# now #magic is available for NameofClass on a class level
Comments
 Subscribe to comments
                    Subscribe to comments
                
                