class Hello
def say &block
self.instance_eval &block
end
def say_hello
"hello!!"
end
end
This file contains hidden or 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
| db.nginx_access.group( | |
| { | |
| key: {url: true}, | |
| cond: {time: { | |
| $gte: ISODate("2013-06-20T00:00:00Z"), | |
| $lte: ISODate("2013-06-21T00:00:00Z")} | |
| }, | |
| initial: {count: 0}, | |
| reduce: function(doc, out){out.count++} | |
| } |
This file contains hidden or 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
| class Hoge | |
| end | |
| @hoge = Hoge.new | |
| @hoge.instance_eval do | |
| def fuga | |
| fuga = Struct.new("Fuga", :piyo) | |
| piyo = Struct.new("Piyo", :udon) | |
| fuga.new(piyo.new("mogumogu")) |
This file contains hidden or 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
| send_data( @history.to_image, :disposition => "inline", :type => "image/png" ) |
LeenoAPIは、取得できるリソースに応じた以下のエンドポイントを持ちます。
- 単一キャンバス http://leeno.jp/api/canvas
- 複数キャンバス http://leeno.jp/api/canvases
- 単一ヒストリ http://leeno.jp/api/history
- 複数ヒストリ http://leeno.jp/api/histories
LeenoAPIは、取得できるリソースに応じた以下のエンドポイントを持ちます。
- 単一キャンバス http://leeno.jp/api/canvas
- 複数キャンバス http://leeno.jp/api/canvases
- 単一ヒストリ http://leeno.jp/api/history
- 複数ヒストリ http://leeno.jp/api/histories
NewerOlder