Content unavailable Click here to try again. If you've seen this page more than once, try switching accounts.
クロージャってブロックとしてよく使っているが、何者なのかよくわかってなかった。 急に気になったので調べてみた。ただし Wikipedia。 クロージャ - Wikipedia 典型的には、クロージャはある関数全体が他の関数(以下、エンクロージャ)の内部で宣言されたときに発生し、内部の関数はエンクロージャのローカル変数(レキシカル変数)を参照する。実行時に外部の関数が実行された際、クロージャが形成される。クロージャは内部の関数のコードとエンクロージャのスコープ内の必要なすべての変数への参照からなる。 内部で宣言された関数は、宣言を行った関数内のローカル変数を参照できるってことかね。 サンプルコード Wikipedia に 載ってた Javascript のカウンタを Ruby で書いてみた。 #!/usr/bin/env ruby def count i = 0 lambda {i += 1
■ [ruby][git] gemspecの作り方がわからない?ならばjewelerだ githubなりrubyforgeなりでgemを公開するときに必要となるのがgemspecファイルですけれども、 これは手書きするのははっきりいってめんどい。それをなんとかしてくれるgithubおすすめの ツールができたらしい。 その名もjeweler。 technicalpickles's jeweler at master - GitHub 使い方は上のページに書いてあるけど、Rakefileに begin require 'jeweler' Jeweler::Tasks.new do |gemspec| gemspec.name = "the-perfect-gem" gemspec.summary = "TODO" gemspec.email = "josh@technicalpickles.c
Builds one-click Windows executables from Ruby source code. OCRA Packages everything needed to run Ruby scripts into a single Windows executable. The executable contains the Ruby interpreter, your script, and any rubygems that your script depends on. Development Status: 5 - Production/Stable Environment: Win32 (MS Windows) Intended Audience: Developers License: MIT/X Consortium License Natural La
「Movatter」は携帯電話からTwitterができるTwitterクライアントです。 おそらく携帯電話からTwitterをしている方は、「もばつい」(モバツイッター)を利用しているのではないでしょうか。 今まで携帯電話用のクライアントがもばついしかなかったので使うしかなかったのですが、 最近、「Movatter」が登場し、これがまた使いやすいのです。 ここ1週間ほど、完全にもばついから「Movatter」に移行してしまいました。 色々と便利な機能がありますので、以下に紹介します。 Twitterでも、Movatterの評判はかなりイイ感じです! Twitterやってます ⇒ http://twitter.com/kamekiti もしよければフォローしてください。 ※Twitterアカウントさえあれば利用可能です。
RubyScript2Exe A Ruby Compiler Tue May 29 20:09:00 UTC 2007 Erik Veenstra <rubyscript2exe@erikveen.dds.nl> PDF version (A4) 1. Introduction 2. Internals 2.1. RubyScript2Exe 2.2. EEE 3. Usage 3.1. Compiling the Application 3.2. Running the Application 3.3. From Inside your Application a) RUBYSCRIPT2EXE.(dlls|bin|lib)= b) RUBYSCRIPT2EXE.tempdir= c) RUBYSCRIPT2EXE.tk= d) RUBYSCRIPT2EXE.rubyw= e) RUBY
インストール $ gem install expectations
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く