Sample codes for extending ruby