るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. rdoc/require require

ライブラリ

キーワード

検索結果

REXML::Elements#to_a(xpath = nil) -> [REXML::Element] (18225.0)

すべての子要素の配列を返します。

...

xpath を指定した場合は、その XPath 文字列に
マッチする要素の配列を返します。

REXML::Elements#each と同様、REXML::XPath.match などと
異なり、要素以外の子ノードは無視されます。

@param xpath XPath文字列

//emlist[][ruby]{
require
'rex...
...ml/document'
require
'rexml/xpath'
doc = REXML::Document.new '<a>sean<b/>elliott<c/></a>'
doc.root.elements.to_a # => [<b/>, <c/>]
doc.root.elements.to_a("child::node()") # => [<b/>, <c/>]
REXML::XPath.match(doc.root, "child::node()") # => ["sean", <b/>, "elliott", <c/>]
//}...

RubyVM::InstructionSequence#to_a -> Array (18125.0)

self の情報を 14 要素の配列にして返します。

...ベルでは "<main>"。文字列から作成していた場合は
"<compiled>"。

: #path

命令シーケンスの相対パス。文字列から作成していた場合は "<compiled>"。

: #absolute_path

命令シーケンスの絶対パス。文字列から作成していた場合は ni...
...配列。

: args

引数の指定が必須のメソッド、ブロックの引数の個数。あるいは以下のよう
な配列。

[required_argc, [optional_arg_labels, ...],
splat_index, post_splat_argc, post_splat_index,
block_index, simple]

より詳細な情報につい...
...命令シーケンスを構成する命令とオペランドの配列の配列。


//emlist[例][ruby]{
require
'pp'

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1,
# {:a...

ruby 1.6 feature (120.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...リロードの実行速度が低下するのだそ
うです) ((<ruby-dev:18145>))

: 2002-08-20 File.expand_path

Cygwin 1.3.x ((<ruby-bugs-ja:PR#299>))

p File.expand_path('file', 'c:/')

=> ruby 1.6.7 (2002-03-01) [i586-linux]
/tmp/c:/file
=> ruby 1.6.7 (20...
...張ライブラリに対して autoload が効いていませんでした。((<ruby-dev:16379>))

autoload :Fcntl, "fcntl"
require
"fcntl"

=> -:2:in `require': uninitialized constant Fcntl (NameError)
from -:2
ruby 1.6.7 (2002-03-01) [i586-linux]

=> ruby 1.6.7 (2...
...Enumerable

def each(&block)
block.call(1,2)
block.call(2,3)
block.call(3,4)
end
end

x = X.new
p x.to_a #=> [[1], [2], [3]]

# => ruby 1.6.3 (2001-03-19) [i586-linux]
[[1], [2], [3]]

# => ruby 1.6.4 (2001-06-04) [i586-linux]...

rubygems (36.0)

RubyGems を扱うためのクラスやモジュールが定義されているライブラリです。

...es を追加しています。

また、以下のように Rakefile にタスクを追加することもできます。

//emlist[gemspec][ruby]{
require
'rake/gempackagetask'

PKG_FILES = FileList[
'lib/hello.rb',
'spec/*'
]
spec = Gem::Specification.new do |s|
s.name = 'hello'...
...ES.to_a
s.require_path = 'lib'
s.has_rdoc = false
s.extra_rdoc_files = ['README']
end

Rake::GemPackageTask.new(spec) do |pkg|
pkg.gem_spec = spec
end
//}

@see Gem::Specification, rake

=== gem コマンドの設定
* GEM_HOME Gem のホームディレクトリ
* GEM_PATH Ge...
...m のサーチパス
* $HOME/.gemrc

環境変数 GEM_HOME, GEM_PATH を設定する事によって Gem コマンドの動作を変更することができます。
また、ホームディレクトリに .gemrc という YAML フォーマットで書かれたファイルを置くことでも
...