Skip to content

Instantly share code, notes, and snippets.

View aoitaku's full-sized avatar
🍷
ぶどうジュース

aotak aoitaku

🍷
ぶどうジュース
View GitHub Profile
@aoitaku
aoitaku / gist:6428318
Created September 3, 2013 19:17
DateTimeを拡張したTimepiece(時計)クラス とりあえず下書きのみ
<?php
date_default_timezone_set('Asia/Tokyo');
/*
* 「時計」クラス
*/
class Timepiece extends DateTime {
static protected $default_format_string = 'Y-m-d H:i:s';
protected $format_string = false;
/*
* デフォルトのフォーマット文字列を設定する
@aoitaku
aoitaku / gist:6174687
Last active December 20, 2015 18:18
temporary `extend'
module Hoge
def hoge
p "hoge"
end
end
block1 = Proc.new {
extend Hoge
hoge
}
block2 = Proc.new {