るりまサーチ

最速Rubyリファレンスマニュアル検索!
593件ヒット [1-100件を表示] (0.042秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file chmod
  4. file umask
  5. file truncate

ライブラリ

クラス

モジュール

検索結果

<< 1 2 3 ... > >>

RubyVM::InstructionSequence.of(body) -> RubyVM::InstructionSequence (21243.0)

引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。

...クトを元に
Ruby
VM::InstructionSequence オブジェクトを作成して返します。

@param body Proc、Method オブジェクトを指定します。

例1:irb で実行した場合

# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSe...
...ding@(irb)>

# method
> def foo(bar); puts bar; end
> RubyVM::InstructionSequence.of(method(:foo))
> # => <RubyVM::InstructionSequence:foo@(irb)>

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/iseq_of.rb
def hello
puts "hello, world"
end

$a_global_...
...}

# irb
> require '/tmp/iseq_of.rb'

# hello メソッド
> RubyVM::InstructionSequence.of(method(:hello))
> # => #<RubyVM::InstructionSequence:0x007fb73d7cb1d0>

# グローバル proc
> RubyVM::InstructionSequence.of($a_global_proc)
> # => #<RubyVM::InstructionSequence:0x007fb73d...

profile (12034.0)

Ruby プログラムのためのプロファイラです。 プロファイラとは効率改善のための調査に用いられるツールのことです。 profile ライブラリは各メソッドの実行時間に関する統計を出力します。

...Ruby プログラムのためのプロファイラです。
プロファイラとは効率改善のための調査に用いられるツールのことです。
profile ライブラリは各メソッドの実行時間に関する統計を出力します。

profile はそれ自身がオーバーヘ...
...呼び出しあたりの処理時間がかなり遅くなります。

=== 使い方

以下のように、ruby に -r profile オプションを付けて実行します。

$ ruby -r profile foo.rb

foo.rb の実行が終わると標準エラー出力にプロファイルが出力されます。...
...を正味時間と呼ぶことにします。

=== 出力の意味

プロファイルの結果は例えば次のようになります。

$ ruby -r profile sample/sieve.rb 1000
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 … 略 …
% cumulative self self tot...

FileUtils.options_of(mid) -> Array (9113.0)

与えられたメソッド名で使用可能なオプション名の配列を返します。

...与えられたメソッド名で使用可能なオプション名の配列を返します。

@param mid メソッド名を指定します。

//emlist[][ruby]{
require 'fileutils'
File
Utils.options_of(:rm) # => ["noop", "verbose", "force"]
//}...

Rake::FileList#kind_of?(klass) -> bool (6125.0)

自身に Array のフリをさせます。

...自身に Array のフリをさせます。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
f
ile_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file
_list.is_a?(Array) # => true
file
_list.is_a?(String) # => false
end
//}...

rubygems/commands/generate_index_command (6054.0)

ある Gem サーバに対するインデックスを作成するためのライブラリです。

...g-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Summary:
Generates the index files...
...nd creates a set of indexes for serving gems
statically. The command expects a 'gems' directory under the path given to
the --directory option. When done, it will generate a set of files like
this:

gems/ # .gem files you want to...
...gacy YAML quick index
file

quick/Marshal.<version>/<gemname>.gemspec.rz # Marshal quick index file
Marshal.<version>
Marshal.<version>.Z # Marshal full index
yaml
yaml.Z # legacy YAML full index

The .Z and .rz extension files are compressed with...

絞り込み条件を変える

rubygems/commands/specification_command (6036.0)

指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのライブラリです。

...pecification [GEMFILE] [options]
Options:
-v, --version VERSION Specify version of gem to examine
--platform PLATFORM Specify the platform of gem to specification
--all Output specifications for all versions of...
...--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Arguments:
GEMFILE ge...

rubygems/commands/uninstall_command (6036.0)

Gem パッケージをアンインストールするためのライブラリです。

...dir DIR Directory to remove binaries from
-v, --version VERSION Specify version of gem to uninstall
--platform PLATFORM Specify the platform of gem to uninstall
Common Options:
-h, --help このコマンドのヘルプ...
...静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にし...
...ます
Arguments:
GEMNAME アンインストールする Gem パッケージ名を指定します。
Summary:
Gem パッケージをアンインストールします
Defaults:
--version '>= 0' --no-force --install-dir /usr/lib/ruby/gems/1.8...

rubygems/commands/lock_command (6030.0)

指定された特定のバージョンの Gem パッケージに依存する Gem を使用するために 必要な Kernel#gem メソッドの呼び出し方法を文字列で出力します。

...静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にし...
...will generate a list of +gem+ statements that will lock
down
the versions for the gem given in the command line. It will specify exact
versions in the requirements list to ensure that the gems loaded will always
be consistent. A full recursive search of all effected gems w...
...generated.

Example:

gemlock rails-1.0.0 > lockdown.rb

will produce in lockdown.rb:

require "rubygems"
gem 'rails', '= 1.0.0'
gem 'rake', '= 0.7.0.1'
gem 'activesupport', '= 1.2.5'
gem 'activerecord', '= 1.13.2'...

rubygems/commands/search_command (6030.0)

指定された文字列を含む Gem パッケージを全て表示するためのライブラリです。

...-[no-]installed Check for installed gem
-v, --version VERSION Specify version of gem to search
-d, --[no-]details Display detailed information of gem(s)
--[no-]versions Display only gem names
-a, --all...
...静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にし...
<< 1 2 3 ... > >>