Skip to content

Instantly share code, notes, and snippets.

@naoto
Created March 24, 2011 12:55
Show Gist options
  • Save naoto/885005 to your computer and use it in GitHub Desktop.
Save naoto/885005 to your computer and use it in GitHub Desktop.
感謝が幸せを生むライブラリ
# -*- coding: utf-8 -*-
# ありがとう
#= 幸せを生むライブラリ
#
# Authors:: NaotoSHINGAKI
# Copyright:: Copyright (c) 2011 Naoto SHINGAKI <nshingaki@gmail.com>
# 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