1066件ヒット
[1-100件を表示]
(0.074秒)
ライブラリ
- English (11)
- ビルトイン (453)
- csv (22)
-
fiddle
/ import (11) -
irb
/ inspector (11) - openssl (132)
- optparse (22)
- ostruct (12)
- pathname (131)
-
rexml
/ document (11) - set (22)
-
shell
/ filter (12) - uri (22)
-
webrick
/ httpresponse (22) - win32ole (33)
- zlib (22)
クラス
- Array (44)
-
CSV
:: Row (22) -
Enumerator
:: Lazy (20) - Hash (66)
- IO (22)
-
IRB
:: Inspector (11) - Module (33)
- Object (26)
-
OpenSSL
:: PKey :: DSA (66) -
OpenSSL
:: PKey :: RSA (66) - OpenStruct (12)
- OptionParser (22)
- Pathname (131)
- Range (11)
- Regexp (11)
-
Shell
:: Filter (12) - Symbol (143)
- Thread (22)
-
Thread
:: Backtrace :: Location (22) -
URI
:: Generic (22) - UnboundMethod (11)
-
WEBrick
:: HTTPResponse (22) -
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ VARIABLE (22) -
Zlib
:: GzipWriter (22)
モジュール
- Enumerable (22)
-
Fiddle
:: Importer (11) - Kernel (22)
キーワード
-
$ ERROR _ INFO (11) -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (11)
- =~ (11)
- ExternalEntity (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Numeric (11)
- [] (55)
-
add
_ trace _ func (11) -
all
_ symbols (11) - bigdecimal (11)
- bind (11)
- binread (11)
-
content
_ length (11) -
content
_ length= (11) -
def
_ inspector (11) -
each
_ entry (13) -
each
_ line (22) - empty? (8)
- export (44)
- find (22)
- grep (11)
-
grep
_ v (9) - handler= (11)
- help (11)
- inspect (22)
- irb (11)
- match (11)
- name (22)
- new (11)
- normalize (11)
- normalize! (11)
- open (22)
- opendir (22)
-
optparse
/ date (11) - owner (11)
- read (11)
- resolv (11)
- rss (11)
-
ruby 1
. 6 feature (11) -
set
_ trace _ func (22) - slice (55)
- syswrite (11)
- then (12)
-
to
_ csv (11) -
to
_ h (12) -
to
_ pem (44) -
to
_ set (22) - tracer (11)
-
transform
_ keys (17) -
transform
_ keys! (17) -
transform
_ values (16) -
transform
_ values! (16) - uniq (22)
- uniq! (22)
- write (22)
-
yield
_ self (14) - メソッド呼び出し(super・ブロック付き・yield) (9)
検索結果
先頭5件
-
Regexp
# to _ s -> String (18321.0) -
正規表現の文字列表現を生成して返します。返される文字列は他の正規表 現に埋め込んでもその意味が保持されるようになっています。
...め込んでもその意味が保持されるようになっています。
//emlist[][ruby]{
re = /foo|bar|baz/i
p re.to_s # => "(?i-mx:foo|bar|baz)"
p /#{re}+/o # => /(?i-mx:foo|bar|baz)+/
//}
ただし、後方参照を含む正規表現は意図通りにはならない場合があり......//emlist[][ruby]{
re = /(foo|bar)\1/ # \1 は、foo か bar
p /(baz)#{re}/ # \1 は、baz
# => /(baz)(?-mix:(foo|bar)\1)/
//}
//emlist[使用例][ruby]{
re = /foo|bar|baz/i
p re.to_s # => "(?i-mx:foo|bar|baz)"
p /#{re}+/o # => /(?i-mx:foo|bar|baz)+/
//}
@see Regexp#inspe... -
Shell
:: Filter # |(filter) -> object (18230.0) -
パイプ結合を filter に対して行います。
...ll.def_system_command("tail")
Shell.def_system_command("head")
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
i = 1
while i <= (cat("/etc/passwd") | wc("-l")).to_s.chomp.to_i
puts (cat("/etc/passwd") | head("-n #{i}") | tail("-n 1")).to_s
i += 1
end
}... -
Thread
:: Backtrace :: Location # to _ s -> String (18219.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
...mlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo.rb:9:in `new'
# path/to/foo.rb:9:in `<main>'
//}... -
Shell
:: Filter # to _ s -> String (18213.0) -
実行結果を文字列で返します。
...実行結果を文字列で返します。
require 'shell'
Shell.def_system_command("wc")
sh = Shell.new
sh.transact {
puts (cat("/etc/passwd") | wc("-l")).to_s
}... -
OpenSSL
:: PKey :: DSA # to _ s(cipher=nil , pass=nil) {|flag| . . . } -> String (15305.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OpenSSL
:: PKey :: RSA # to _ s(cipher=nil , pass=nil) {|flag| . . . } -> String (15305.0) -
鍵を PEM 形式で出力します。
鍵を PEM 形式で出力します。
cipher と pass が指定された場合、
秘密鍵を暗号 cipher OpenSSL::Cipher::Cipher
とパスワード pass を使って暗号化します。
cipher を指定して pass を省略した場合は
渡されたブロックを呼びだしてパスフレーズを要求します。ブロックの返り値を
パスフレーズとみなして暗号化します。
ブロックの引数は通常は true が渡されますが、
これはそのパスフレーズが秘密鍵の暗号化に使われることを意味します。
ブロックが渡されなかった場合にはターミナルに問い合わせをします。
公開鍵を出力する場合は ciphe... -
OptionParser
# to _ s -> String (15231.0) -
サマリの文字列を返します。
...se"
options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end
puts opts.help
# => Usage: example.rb [options]
# -v, --[no-]verbose Run verbosely
//}... -
Module
# to _ s -> String (15214.0) -
モジュールやクラスの名前を文字列で返します。
...lass C
end
end
p A.name #=> "A"
p A::B.name #=> "A::B"
p A::C.name #=> "A::C"
# 名前のないモジュール / クラス
p Module.new.name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}... -
WIN32OLE
_ VARIABLE # to _ s -> String (15213.0) -
変数名を取得します。
...変数名を取得します。
@return 変数名を文字列で返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name}" # => xlChart, xlDialogSheet, ...
end... -
CSV
:: Row # to _ s -> String (15207.0) -
自身を CSV な文字列として返します。ヘッダは使用しません。
...自身を CSV な文字列として返します。ヘッダは使用しません。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2"], [1, 2])
row.to_csv # => "1,2\n"
row.to_csv( {col_sep: "|", row_sep: "<br>"} ) # => "1|2<br>"
//}...