るりまサーチ

最速Rubyリファレンスマニュアル検索!
3041件ヒット [1-100件を表示] (0.155秒)
トップページ > クエリ:i[x] > クエリ:l[x] > クエリ:$[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

irb/completion (32006.0)

irb の completion 機能を提供するライブラリです。

...irb の completion 機能を提供するライブラリです。

=== 使い方

$
irb -r irb/completion

とするか, ~/.irbrc 中に

require "irb/completion"

を入れてください.
i
rb実行中に require "irb/completion" してもよいです.

i
rb 実行中に [Tab] を押すとコ...
...全に補完します.

i
rb(main):001:0> in
i
n inspect instance_eval
i
nclude install_alias_method instance_of?
i
nitialize install_aliases instance_variables
i
rb(main):001:0> inspect
"main"
i
rb(main):002:0> foo = Objec...
...覧がでます.

i
rb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect f...

irb (26198.0)

irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

...irb は Interactive Ruby の略です。
i
rb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。

=== irb の使い方

Ruby さえ知っていれば irb を使うのは簡単です。
i
rb コマンドを実行すると、以下のようなプロン...
...す。

$
irb
i
rb(main):001:0>

あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。

i
rb(main):001:0> 1+2
3
i
rb(main):002:0> class Foo
i
rb(main):003:1> def foo
i
rb(main):004:2> print 1
i
rb(main):005:2> end
i
rb(main):006:...
...1> end
:foo
i
rb(main):007:0>

また irb コマンドは readline ライブラリにも対応しています。
readline ライブラリがインストールされている時には
自動的にコマンドライン編集や履歴の機能が使えるようになります。

=== irb のコマ...

Kernel$$INPUT_LINE_NUMBER -> Integer (24514.0)

$. の別名

...
$
. の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

require "English"

File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb

ruby sample.rb a.txt
#=> 5...

Kernel$$LAST_READ_LINE -> String | nil (18419.0)

$_ の別名

...
$
_ の別名

1 e
2 f
3 g
4 h
5 i
# end of a.txt

ruby -rEnglish -ne'p $LAST_READ_LINE' a.txt
#=>
"1 e\n"
"2 f\n"
"3 g\n"
"4 h\n"
"5 i\n"...

Kernel$$CHILD_STATUS -> Process::Status | nil (18413.0)

$? の別名

...
$
? の別名

require "English"

out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`

i
f $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end...

絞り込み条件を変える

ARGF.class#internal_encoding -> Encoding | nil (18406.0)

ARGF から読み込んだ文字列の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。

...nil を返します。

まだ読み込み処理を始めていない場合は Encoding.default_external を返します。

ARGF.class#set_encoding で設定します。


例:
# $ ruby -Eutf-8 test.rb

# test.rb
ARGF.internal_encoding # => #<Encoding:UTF-8>
ARGF.set_encoding('u...
...tf-8','ascii')
ARGF.internal_encoding # => #<Encoding:US-ASCII>

例:
ARGF.binmode
ARGF.internal_encoding # => nil

@see IO, ARGF.class#external_encoding...

PP.singleline_pp(obj, out=$>) -> object (18400.0)

指定されたオブジェクト obj を出力先 out に出力します。 ただし、インデントも改行もしません。 出力先 out を返します。

指定されたオブジェクト obj を出力先 out に出力します。
ただし、インデントも改行もしません。
出力先 out を返します。

@param obj 表示したいオブジェクトを指定します。

@param out 出力先を指定します。<< メソッドが定義されている必要があります。

Kernel$$LAST_MATCH_INFO -> MatchData | nil (18319.0)

$~ の別名

...
$
~ の別名

require "English"

str = "<a href=https://www.ruby-lang.org/en/about/license.txt>license</a>"

i
f /<a href=(.+?)>/ =~ str
p $LAST_MATCH_INFO[0] #=> "<a href=https://www.ruby-lang.org/en/about/license.txt>"
p $LAST_MATCH_INFO[1] #=> "https://www.ruby-lang.org/en/about/lic...
...ense.txt"
p $LAST_MATCH_INFO[2] #=> nil
end...

Kernel$$FIELD_SEPARATOR -> String | nil (18308.0)

$; の別名

...
$
; の別名

require "English"

str = "hoge,fuga,ugo,bar,foo"
p str.split #=> ["hoge,fuga,ugo,bar,foo"]
$
FIELD_SEPARATOR = ","
p str.split #=> ["hoge", "fuga", "ugo", "bar", "foo"]...

Kernel$$DEFAULT_INPUT -> IO (18307.0)

$< の別名

...
$
< の別名

require "English"
while line = $DEFAULT_INPUT.gets
p line
end
# end of sample.rb

ruby sample.rb < /etc/passwd
# => "hoge:x:500:501::/home/hoge:/bin/bash\n"
......

絞り込み条件を変える

<< 1 2 3 ... > >>