Created
March 24, 2011 12:55
-
-
Save naoto/885005 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
# -*- coding: utf-8 -*- | |
# ありがとう | |
#= 幸せを生むライブラリ | |
# | |
# Authors:: NaotoSHINGAKI | |
# Copyright:: Copyright (c) 2011 Naoto SHINGAKI <[email protected]> | |
# URL:: http://github.com/naoto | |
# Licence:: The MIT License. See LICENSE for details. | |
# | |
#= Usage | |
# | |
# require 'thanks' | |
# | |
# class Foo | |
# def bar | |
# "Arigato" | |
# end | |
# end | |
# | |
# foo = Foo.thanks | |
# foo.class #=> Foo | |
# foo.bar #=> "Arigato" | |
# | |
# hago = Foo.thanks! | |
# hago.class #=> nil | |
# | |
#= | |
class Object | |
def self.thanks(*args) | |
self.new(*args) | |
end | |
def self.thanks!(*args) | |
nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment