種類
- インスタンスメソッド (299)
- モジュール関数 (126)
- 特異メソッド (115)
- クラス (11)
- ライブラリ (11)
ライブラリ
クラス
- Array (3)
- Data (2)
-
Encoding
:: Converter (11) - MatchData (11)
-
Net
:: HTTP (99) -
RubyVM
:: AbstractSyntaxTree :: Node (6) -
RubyVM
:: InstructionSequence (110) - Set (18)
- Shell (6)
- String (11)
- StringScanner (11)
- Tempfile (30)
-
Thread
:: Backtrace :: Location (11) - TracePoint (6)
- WIN32OLE (11)
-
WIN32OLE
_ TYPE (11)
モジュール
- JSON (22)
- Kernel (82)
-
OpenSSL
:: Buffering (11) - OpenURI (22)
-
RubyVM
:: AbstractSyntaxTree (2) - Syslog (44)
キーワード
- Digest (11)
-
absolute
_ path (11) -
base
_ label (11) -
compile
_ file (11) -
const
_ load (11) -
deconstruct
_ keys (2) - disasm (22)
- disassemble (22)
- exec (44)
- get2 (22)
-
insert
_ output (11) - inspect (61)
-
install
_ system _ commands (6) -
instruction
_ sequence (6) - label (11)
- new (10)
- of (13)
- open (58)
- open! (11)
-
open
_ uri (22) - path (11)
- post2 (22)
-
pretty
_ generate (11) -
pretty
_ unparse (11) -
rdoc
/ markup / to _ ansi (11) - reopen (11)
-
request
_ get (22) -
request
_ post (22) -
send
_ request (11) -
to
_ csv (3) -
to
_ s (7) -
try
_ link (22) - unscan (11)
検索結果
先頭5件
-
OpenSSL
:: Buffering # puts(*objs) -> nil (24207.0) -
各オブジェクトを出力し、それぞれの後に改行を出力します。
...各オブジェクトを出力し、それぞれの後に改行を出力します。
IO#puts と同様です。
@param objs 出力したいオブジェクト... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (15706.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file......tions コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
# /tmp/hello.rb
puts "Hello, world!"
# i......rb
RubyVM::InstructionSequence.compile_file("/tmp/hello.rb")
# => <RubyVM::InstructionSequence:<main>@/tmp/hello.rb>
@see RubyVM::InstructionSequence.compile... -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (15506.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
Encoding
:: Converter # insert _ output(string) -> nil (15324.0) -
変換器内のバッファに文字列を挿入します。 バッファに保持された文字列は、次の変換時の変換結果と一緒に返されます。
...aram string 挿入する文字列
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-8", "iso-8859-1")
src = "HIRAGANA LETTER A is \u{3042}."
dst = ""
p ec.primitive_convert(src, dst) #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is ", "."]
ec.insert_outp......r>")
p ec.primitive_convert(src, dst) #=> :finished
puts "[#{dst.dump}, #{src.dump}]" #=> ["HIRAGANA LETTER A is <err>.", ""]
ec = Encoding::Converter.new("utf-8", "iso-2022-jp")
src = "\u{306F 3041 3068 2661 3002}" # U+2661 is not representable in iso-2022-jp
dst = ""
p ec.primitive_convert(s......rc, dst) #=> :undefined_conversion
puts "[#{dst.dump}, #{src.dump}]" #=> ["\e$B$O$!$H".force_encoding("ISO-2022-JP"), "\xE3\ x80\x82"]
ec.insert_output "?" # state change required to output "?".
p ec.primitive_convert(src, dst) #=> :finished
puts "[#{dst.dump}, #{src.dump}... -
String
# inspect -> String (15312.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
...ために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect # => "\t\r\n"
//}
@see String#dump... -
WIN32OLE
_ TYPE # inspect -> String (15306.0) -
selfを説明的な文字列で表現します。
...ます。
@return "#<WIN32OLE_TYPE"とWIN32OLE_TYPE#to_sの結果を「:」で結合
し、「>」で閉じた文字列を返します。
x = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
puts x.inspect #=> #<WIN32OLE_TYPE:Worksheet>
@see WIN32OLE_TYPE#to_s... -
MatchData
# inspect -> String (12324.0) -
self の内容を人間に読みやすい文字列にして返します。
...//emlist[例][ruby]{
puts /.$/.match("foo").inspect
# => #<MatchData "o">
puts /(.)(.)(.)/.match("foo").inspect
# => #<MatchData "foo" 1:"f" 2:"o" 3:"o">
puts /(.)(.)?(.)/.match("fo").inspect
# => #<MatchData "fo" 1:"f" 2:nil 3:"o">
puts /(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").inspect
# =>... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (12306.0) -
self のデバッグ用の情報を含んだ文字列を返します。
...self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//}... -
Set
# inspect -> String (12306.0) -
人間の読みやすい形に表現した文字列を返します。
...人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
require 'set'
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//}... -
Thread
:: Backtrace :: Location # inspect -> String (12306.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
...ace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][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.inspect
end
# => "path/to/foo.rb:5:in `initialize'"
# "path/to/foo.rb:9:in `new'"
# "path/to/foo.rb:9:in `<main>'"
//}...