るりまサーチ

最速Rubyリファレンスマニュアル検索!
809件ヒット [201-300件を表示] (0.014秒)
トップページ > クエリ:sample[x]

別のキーワード

  1. array sample
  2. _builtin sample
  3. sample array
  4. sample random

ライブラリ

モジュール

検索結果

<< < 1 2 3 4 5 ... > >>

Kernel$$DEFAULT_INPUT -> IO (12.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_LINE_NUMBER -> Integer (12.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_PAREN_MATCH -> String | nil (12.0)

$+ の別名

...while line = DATA.gets
[ r1, r2 ].each {|rep|
rep =~ line
p $+
}
end
__END__
<tr> <td><img src=http://localhost/a.jpg></td> <td>ikkou</td> <td><a href=http://localhost/link.html>link</a></td> </tr>
#enf of sample.rb

$ ruby sample.rb
"http://localhost/a.jpg"
"link"...

Kernel$$NR -> Integer (12.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$$ORS -> String | nil (12.0)

$\ の別名

...$\ の別名

require "English"

print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb

ruby sample.rb
hoge
huga
fuge
ugo...

絞り込み条件を変える

Kernel$$OUTPUT_RECORD_SEPARATOR -> String | nil (12.0)

$\ の別名

...$\ の別名

require "English"

print "hoge\nhuga\n"
$OUTPUT_RECORD_SEPARATOR = "\n"
print "fuge"
print "ugo"
# end of sample.rb

ruby sample.rb
hoge
huga
fuge
ugo...

Pathname#split -> Array (12.0)

File.split(self.to_s) と同じです。

...File.split(self.to_s) と同じです。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

Proc#binding -> Binding (12.0)

Proc オブジェクトが保持するコンテキストを Binding オブジェクトで返します。

...Proc オブジェクトが保持するコンテキストを
Binding オブジェクトで返します。

//emlist[例][ruby]{
def fred(param)
proc {}
end

sample
_proc = fred(99)
eval("param", sample_proc.binding) # => 99
//}...

Rake::NameSpace.new(task_manager, scope_list) (12.0)

自身を初期化します。

...@param scope_list 名前空間のリストを指定します。

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

task default: :test_rake_app
task :test_rake_app do
name_space = Rake::NameSpace.new(Rake.application, Rake::Scope.new("sample"))
name_space.scope # => LL("sample")
end
//}...
<< < 1 2 3 4 5 ... > >>