るりまサーチ

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

別のキーワード

  1. irb/input-method gets
  2. irb/input-method new
  3. irb/input-method encoding
  4. irb/input-method readable_atfer_eof?
  5. readline input=

検索結果

<< 1 2 > >>

IRB::FileInputMethod#gets -> String (21101.0)

読み込んだファイルから文字列を 1 行読み込みます。

読み込んだファイルから文字列を 1 行読み込みます。

IRB::InputMethod#gets (21101.0)

NotImplementedError が発生します。

NotImplementedError が発生します。

@raise NotImplementedError 必ず発生します。

IRB::ReadlineInputMethod#gets -> String (21101.0)

標準入力から文字列を 1 行読み込みます。

標準入力から文字列を 1 行読み込みます。

IRB::StdioInputMethod#gets -> String (21101.0)

標準入力から文字列を 1 行読み込みます。

標準入力から文字列を 1 行読み込みます。

Kernel$$DEFAULT_INPUT -> IO (6113.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"
......

絞り込み条件を変える

Kernel$$INPUT_RECORD_SEPARATOR -> String | nil (6113.0)

$/ の別名

...$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...

Kernel$$RS -> String | nil (3013.0)

$/ の別名

...$/ の別名

require "English"

$INPUT_RECORD_SEPARATOR = '|'
array = []
while line = DATA.gets
array << line
end
p array #=> ["ugo|", "ego|", "fogo\n"]

__END__
ugo|ego|fogo...

NKF (66.0)

nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を Ruby から使うためのモジュールです。

...ンドの例です。

//emlist[例][ruby]{
#!/usr/local/bin/ruby

require 'nkf'

opt = ''
opt = ARGV.shift if ARGV[0][0] == ?-

while line = ARGF.gets
print NKF.nkf(opt, line)
end
//}

以下は、漢字コード判別コマンドの例です。

//emlist[例][ruby]{
#!/usr/local/bin/ruby

requir...
...TF8",
NKF::BINARY => "BINARY",
NKF::ASCII => "ASCII",
NKF::UNKNOWN => "UNKNOWN",
}

while file = ARGV.shift
str = open(file) {|io| io.gets(nil) }

printf "%-10s ", file
if str.nil?
puts "EMPTY"
else
puts CODES.fetch(NKF.guess(str))
end
end
//}

=== オプション文...
...変換をします。
--jis --euc --sjis --mime --base64 対応する変換をします。
--jis-input --euc-input --sjis-input --mime-input --base64-input 入力を仮定します。
--ic=input_codeset --oc=output-codeset 入力、出力それぞれのエンコーディングを指定しま...

static VALUE lex_getline(void) (32.0)

関数 lex_gets を使って lex_input から Ruby プログラムを一行読みこみます。

...関数 lex_gets を使って lex_input から
Ruby プログラムを一行読みこみます。...
<< 1 2 > >>