c.f. bundle installするときはpathを指定しよう | FIRN.JP
プロジェクト用のディレクトリを作成して
[~] $ mkdir hogeproj
[~] $ cd hogeproj
Gemfileを編集
require 'rack' | |
class App | |
def call(env) | |
to = Rack::Request.new(env).params["to"] || "World" | |
body = Rack::Utils.escape_html(to) | |
[200, {"Content-Type" => "text/html"}, [body]] | |
end | |
end |
c.f. bundle installするときはpathを指定しよう | FIRN.JP
プロジェクト用のディレクトリを作成して
[~] $ mkdir hogeproj
[~] $ cd hogeproj
Gemfileを編集
#プロトタイプと、あとクラス、継承、ミックスインと呼ばれている物の説明
この文書はなるべく正確な情報を書きたいのでちょくちょく更新されます。あと、ちょくちょくキャラが変わるのは気にしないでください。修正した部分に関する情報は コメント やリビジョンを参照してください。
Javascriptの変数にはプリミティブ型とオブジェクト型が存在する。
###プリミティブ型
class A | |
def foo(num) | |
%w[one two three][num - 1] | |
end | |
end | |
describe A do | |
describe "#foo" do | |
RSpec::Matchers.define :do_foo do |args| | |
match do |instance| |
(function() { | |
var Class = function() {}, | |
slice = Array.prototype.slice, | |
include; | |
Class.include = Class.prototype.include = include = function() { | |
var self = this; |
americano ~ (▰╹◡╹) ruby -e 'nil while true' & | |
[1] 34491 | |
americano ~ (▰╹◡╹) ps aux|head -n1; ps aux|grep ruby | |
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND | |
sorah 34491 99.6 0.1 2457324 5912 s001 RN 6:19PM 0:09.43 ruby -e nil while true | |
americano ~ (▰╹◡╹) kill %1 | |
[1] + terminated ruby -e 'nil while true' |
(書きかけ)
if (!context.setup) { | |
context.setup = true; | |
var app = { | |
counts: { | |
GET: 0, | |
POST: 0, | |
}, | |
$log: $('<pre>').appendTo($(document.body)), | |
urls: [], |
オブジェクト指向じゃない
.A{