ライブラリ
- ビルトイン (94)
- bigdecimal (1)
- csv (5)
- digest (1)
- drb (3)
-
drb
/ acl (1) - fileutils (1)
- forwardable (3)
-
io
/ console (2) - ipaddr (1)
-
irb
/ context (7) -
irb
/ extend-command (3) -
irb
/ inspector (7) - matrix (2)
- mkmf (2)
-
net
/ http (1) -
net
/ smtp (1) - openssl (11)
- optparse (1)
- ostruct (3)
- pp (3)
- prime (1)
- rake (3)
-
rdoc
/ context (2) -
rexml
/ document (13) -
rexml
/ parsers / pullparser (1) -
rexml
/ sax2listener (1) -
rexml
/ streamlistener (1) -
rubygems
/ command (1) -
rubygems
/ command _ manager (1) -
rubygems
/ commands / install _ command (1) -
rubygems
/ commands / uninstall _ command (1) -
rubygems
/ commands / update _ command (1) -
rubygems
/ dependency _ installer (9) -
rubygems
/ doc _ manager (4) -
rubygems
/ exceptions (3) -
rubygems
/ indexer (1) -
rubygems
/ installer (27) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ source _ index (2) -
rubygems
/ specification (3) -
rubygems
/ uninstaller (13) -
rubygems
/ user _ interaction (1) - singleton (1)
- socket (2)
- strscan (1)
- syslog (1)
- un (1)
-
webrick
/ httpservlet / abstract (1) -
webrick
/ httpservlet / prochandler (1) -
win32
/ registry (1) - win32ole (1)
- zlib (1)
クラス
- ACL (1)
-
ARGF
. class (2) - Addrinfo (1)
- Array (3)
- BasicObject (3)
- BigDecimal (1)
- CSV (3)
-
CSV
:: Row (1) -
CSV
:: Table (1) - Complex (1)
-
DRb
:: DRbServer (1) - Data (2)
- Dir (1)
- Encoding (1)
-
Encoding
:: Converter (2) -
Enumerator
:: ArithmeticSequence (1) -
Enumerator
:: Chain (1) - Exception (1)
- FalseClass (2)
- Float (2)
-
Gem
:: Command (1) -
Gem
:: CommandManager (1) -
Gem
:: Commands :: UpdateCommand (1) -
Gem
:: DependencyInstaller (8) -
Gem
:: DocManager (4) -
Gem
:: Indexer (1) -
Gem
:: Installer (25) -
Gem
:: RemoteFetcher (1) -
Gem
:: SourceIndex (2) -
Gem
:: Specification (3) -
Gem
:: StreamUI (1) -
Gem
:: Uninstaller (12) - Hash (2)
- IO (2)
- IPAddr (1)
-
IRB
:: Context (7) -
IRB
:: Inspector (4) - Integer (2)
- MatchData (1)
- Matrix (1)
- Method (2)
- Module (9)
-
Net
:: SMTP (1) - Object (10)
-
OpenSSL
:: HMAC (1) - OpenStruct (3)
-
OptionParser
:: ParseError (1) - Prime (1)
- Proc (2)
-
Process
:: Status (1) -
RDoc
:: Context (1) -
RDoc
:: Context :: Section (1) -
REXML
:: Element (1) -
REXML
:: Instruction (8) -
REXML
:: Parent (2) -
REXML
:: Parsers :: PullEvent (1) -
Rake
:: Task (1) -
Rake
:: TaskArguments (2) - Range (1)
- Rational (1)
- Regexp (1)
- RubyVM (1)
-
RubyVM
:: AbstractSyntaxTree :: Node (1) -
RubyVM
:: InstructionSequence (21) - Set (2)
-
Socket
:: Ifaddr (1) - String (2)
- StringScanner (1)
- Struct (2)
- Symbol (1)
- Thread (2)
-
Thread
:: Backtrace :: Location (1) - Time (1)
- TracePoint (2)
- TrueClass (1)
- UnboundMethod (2)
- Vector (1)
-
WEBrick
:: HTTPServlet :: AbstractServlet (1) -
WEBrick
:: HTTPServlet :: ProcHandler (1) -
WIN32OLE
_ TYPE (1) -
Win32
:: Registry (1) -
Zlib
:: GzipFile :: Error (1)
モジュール
- DRb (2)
- FileUtils (1)
- Forwardable (3)
-
Gem
:: InstallUpdateOptions (2) - IRB (1)
-
IRB
:: ContextExtender (1) -
IRB
:: ExtendCommandBundle (2) - Kernel (3)
-
OpenSSL
:: SSL (10) -
REXML
:: Node (1) -
REXML
:: SAX2Listener (1) -
REXML
:: StreamListener (1) - Singleton (1)
- Syslog (1)
キーワード
- == (1)
-
DEFAULT
_ OPTIONS (1) - DependencyInstaller (1)
- ExtensionBuildError (1)
- HTTPInsufficientStorage (1)
-
INSECURE
_ METHOD (1) - INSPECTORS (1)
-
INSTRUCTION
_ NAMES (1) - InspectKey (1)
- Inspector (2)
- InstallCommand (1)
- InstallError (1)
- InstallUpdateOptions (1)
- Installer (1)
- Instance (1)
- Instruction (1)
- InstructionSequence (1)
-
NO
_ INSPECTING _ IVARS (1) -
OP
_ DONT _ INSERT _ EMPTY _ FRAGMENTS (1) -
OP
_ MICROSOFT _ BIG _ SSLV3 _ BUFFER (1) -
OP
_ MICROSOFT _ SESS _ ID _ BUG (1) -
OP
_ MSIE _ SSLV2 _ RSA _ PADDING (1) -
OP
_ NETSCAPE _ CHALLENGE _ BUG (1) -
OP
_ NETSCAPE _ REUSE _ CIPHER _ CHANGE _ BUG (1) -
OP
_ SSLEAY _ 080 _ CLIENT _ DH _ BUG (1) -
OP
_ SSLREF2 _ REUSE _ CERT _ TYPE _ BUG (1) -
OP
_ TLS _ BLOCK _ PADDING _ BUG (1) -
OP
_ TLS _ D5 _ BUG (1) - RemoteInstallationCancelled (1)
- RemoteInstallationSkipped (1)
- TYPES (1)
- UninstallCommand (1)
- Uninstaller (1)
-
_ _ inspect _ _ (1) -
absolute
_ path (1) -
app
_ script _ text (1) -
ask
_ if _ ok (1) -
base
_ label (1) - begins? (1)
-
bin
_ dir (2) -
build
_ extensions (1) - clone (1)
- compile (1)
-
compile
_ file (1) -
compile
_ option (1) -
compile
_ option= (1) - content (1)
- content= (1)
-
def
_ inspector (1) -
def
_ instance _ delegator (1) -
def
_ instance _ delegators (1) -
dependencies
_ ok? (1) - disasm (2)
- disassemble (2)
- download (1)
-
ensure
_ dependency (1) - eval (1)
-
exec
_ format (1) -
exec
_ format= (1) -
extract
_ files (1) -
find
_ gems _ with _ sources (1) -
find
_ spec _ by _ name _ and _ version (1) -
first
_ lineno (1) -
formatted
_ program _ filename (1) -
from
_ installed _ gems (1) -
gather
_ dependencies (1) -
gem
_ home (2) -
gems
_ to _ install (1) -
generate
_ bin (1) -
generate
_ bin _ script (1) -
generate
_ bin _ symlink (1) -
generate
_ windows _ script (1) -
get
_ instance (2) -
home
_ install _ warning (1) -
home
_ install _ warning= (1) -
index
_ in _ parent (1) - init (1)
-
ins
_ methods _ i (1) -
ins
_ methods _ priv _ i (1) -
ins
_ methods _ prot _ i (1) - insert (2)
-
insert
_ after (1) -
insert
_ before (1) -
insert
_ output (1) - inspect (57)
- inspect? (1)
-
inspect
_ i (1) -
inspect
_ mode (1) -
inspect
_ mode= (1) -
inspect
_ obj (1) -
inspect
_ sockaddr (1) -
inspect
_ value (1) - install (4)
-
install
_ acl (1) -
install
_ alias _ method (1) -
install
_ extend _ commands (2) -
install
_ files (1) -
install
_ id _ conv (1) -
install
_ indices (1) -
install
_ list (1) -
install
_ rb (1) -
install
_ rdoc (1) -
install
_ ri (1) -
install
_ update _ defaults _ str (1) -
installation
_ path (1) -
installation
_ satisfies _ dependency? (1) -
installed
_ gems (1) -
installed
_ spec _ directories (1) - instance (6)
-
instance
_ delegate (1) -
instance
_ eval (2) -
instance
_ exec (1) -
instance
_ method (1) -
instance
_ methods (1) -
instance
_ of? (1) -
instance
_ variable _ defined? (1) -
instance
_ variable _ get (1) -
instance
_ variable _ set (1) -
instance
_ variables (1) - instruction (1)
- instruction? (1)
-
instruction
_ sequence (1) - instructions (1)
-
irb
/ inspector (1) -
keys
_ with _ inspector (1) - label (1)
-
load
_ from _ binary (1) -
load
_ from _ binary _ extra _ data (1) -
method
_ inspect (1) - name (1)
- new (5)
-
node
_ type (1) - of (1)
- path (1)
-
path
_ ok? (1) -
path
_ warning (1) -
path
_ warning= (1) -
pretty
_ inspect (1) -
pretty
_ print _ inspect (1) -
pretty
_ print _ instance _ variables (1) -
private
_ instance _ methods (1) -
processing
_ instruction (1) -
protected
_ instance _ methods (1) -
public
_ instance _ method (1) -
public
_ instance _ methods (1) -
rb
_ class _ allocate _ instance (1) -
rb
_ class _ instance _ methods (1) -
rb
_ class _ new _ instance (1) -
rb
_ class _ private _ instance _ methods (1) -
rb
_ class _ protected _ instance _ methods (1) -
rb
_ inspect (1) -
rb
_ is _ instance _ id (1) -
rb
_ obj _ inspect (1) -
rb
_ obj _ instance _ eval (1) -
rb
_ obj _ instance _ variables (1) -
rb
_ obj _ is _ instance _ of (1) -
rb
_ obj _ remove _ instance _ variable (1) -
rb
_ thread _ inspect (1) -
rdoc
_ installed? (1) - remove (1)
-
remove
_ all (1) -
remove
_ executables (1) -
remove
_ instance _ variable (1) -
rubygems
/ commands / install _ command (1) -
rubygems
/ commands / uninstall _ command (1) -
rubygems
/ dependency _ installer (1) -
rubygems
/ installer (1) -
rubygems
/ uninstaller (1) - shebang (1)
- spec (2)
-
st
_ insert (1) - target (1)
- target= (1)
-
to
_ a (1) -
to
_ binary (1) -
to
_ s (18) - uninstall (1)
-
uninstall
_ doc (1) -
uninstall
_ gem (1) - unpack (1)
-
which
_ to _ update (1) -
windows
_ stub _ script (1) - winsize (1)
- winsize= (1)
-
write
_ spec (1)
検索結果
先頭5件
-
Object
# instance _ variable _ get(var) -> object | nil (18301.0) -
オブジェクトのインスタンス変数の値を取得して返します。
オブジェクトのインスタンス変数の値を取得して返します。
インスタンス変数が定義されていなければ nil を返します。
@param var インスタンス変数名を文字列か Symbol で指定します。
//emlist[][ruby]{
class Foo
def initialize
@foo = 1
end
end
obj = Foo.new
p obj.instance_variable_get("@foo") #=> 1
p obj.instance_variable_get(:@foo) #=> 1
p obj.instance_variab... -
Object
# instance _ variable _ set(var , value) -> object (18301.0) -
オブジェクトのインスタンス変数 var に値 value を設定します。
オブジェクトのインスタンス変数 var に値 value を設定します。
インスタンス変数が定義されていなければ新たに定義されます。
@param var インスタンス変数名を文字列か Symbol で指定します。
@param value 設定する値です。
@return value を返します。
//emlist[][ruby]{
obj = Object.new
p obj.instance_variable_set("@foo", 1) #=> 1
p obj.instance_variable_set(:@foo, 2) #=> 2
p obj.instance_var... -
Object
# instance _ variables -> [Symbol] (18301.0) -
オブジェクトのインスタンス変数名をシンボルの配列として返します。
オブジェクトのインスタンス変数名をシンボルの配列として返します。
//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p obj.instance_variables
#=> [:@foo, :@bar]
//}
@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variabl... -
Object
# pretty _ inspect -> String (18301.0) -
self を pp で表示したときの結果を文字列として返します。
self を pp で表示したときの結果を文字列として返します。 -
Object
# pretty _ print _ inspect -> String (18301.0) -
Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。
Object#pretty_print を使って Object#inspect と同様に
オブジェクトを人間が読める形式に変換した文字列を返します。
出力する全てのオブジェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeError が発生します。
@raise RuntimeError 出力する全てのオブジェクトに Object#pretty_print が定義されて
いない場合に発生します。 -
Object
# pretty _ print _ instance _ variables -> [String | Symbol] (18301.0) -
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。 返されたインスタンス変数はプリティプリント時に表示されます。
プリティプリント時に表示すべき自身のインスタンス変数名の配列をソートして返します。
返されたインスタンス変数はプリティプリント時に表示されます。
pp に表示したくないインスタンス変数がある場合にこのメソッドを再定義します。 -
Object
# remove _ instance _ variable(name) -> object (18301.0) -
オブジェクトからインスタンス変数 name を取り除き、そのインス タンス変数に設定されていた値を返します。
オブジェクトからインスタンス変数 name を取り除き、そのインス
タンス変数に設定されていた値を返します。
@param name 削除するインスタンス変数の名前をシンボルか文字列で指定します。
@raise NameError オブジェクトがインスタンス変数 name を持たない場合に発生します。
//emlist[][ruby]{
class Foo
def foo
@foo = 1
p remove_instance_variable(:@foo) #=> 1
p remove_instance_variable(:@foo) # instance v... -
OpenSSL
:: SSL :: OP _ DONT _ INSERT _ EMPTY _ FRAGMENTS -> Integer (18301.0) -
SSL 通信での各種バグ回避コードを有効にするフラグです。
SSL 通信での各種バグ回避コードを有効にするフラグです。
OpenSSL::SSL::SSLContext#options= で利用します。
通常は OpenSSL::SSL::OP_ALL でこれらすべてを有効にします。
特定のフラグのみ無効にしたい場合は例えば
ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS
などとします。 -
OpenStruct
# inspect -> String (18301.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect -
OptionParser
:: ParseError # inspect -> String (18301.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
@return 文字列を返します。
@see Object#inspect -
Prime
. instance -> Prime (18301.0) -
Prime のデフォルトのインスタンスを返します。
Prime のデフォルトのインスタンスを返します。 -
Proc
# inspect -> String (18301.0) -
self の文字列表現を返します。
self の文字列表現を返します。
可能なら self を生成したソースファイル名、行番号を含みます。
//emlist[例][ruby]{
p Proc.new {
true
}.to_s
# => "#<Proc:0x0x401a880c@-:3>"
//} -
Process
:: Status # inspect -> String (18301.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
プロセスの状態を以下のフォーマットで返します。
: 正常終了のとき
#<Process::Status: pid=18262,exited(nnn)>
: シグナルによる停止のとき
#<Process::Status: pid=18262,stopped(SIGxxx=nnn)>
: シグナルによる終了のとき
#<Process::Status: pid=18262,signaled(SIGxxx=nnn)>
: コアダンプしたとき(このステータスの表示はシステムに依存します)
#<Process::Status: pid=1... -
RDoc
:: Context :: Section # inspect -> String (18301.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。 -
REXML
:: Parent # insert _ after(child1 , child2) -> self (18301.0) -
child2 を child1 で指定したノードの後ろに挿入します。
child2 を child1 で指定したノードの後ろに挿入します。
child1 が REXML::Child のインスタンスであるならば、その
子ノードの後ろに挿入されます。
child1 が 文字列であるならば、XPath で場所を指定します。
具体的には REXML::XPath.first(self, child1) で特定されるノードの
後ろに挿入されます。
挿入されるノード(child2)の親は self に変更されます。
@param child1 挿入場所の指定
@param child2 挿入されるノード -
REXML
:: Parent # insert _ before(child1 , child2) -> self (18301.0) -
child2 を child1 で指定したノードの前に挿入します。
child2 を child1 で指定したノードの前に挿入します。
child1 が REXML::Child のインスタンスであるならば、その
子ノードの前に挿入されます。
child1 が 文字列であるならば、XPath で場所を指定します。
具体的には REXML::XPath.first(self, child1) で特定されるノードの
前に挿入されます。
挿入されるノード(child2)の親は self に変更されます。
@param child1 挿入場所の指定
@param child2 挿入されるノード -
REXML
:: Parsers :: PullEvent # instruction? -> bool (18301.0) -
XML処理命令なら真を返します。
XML処理命令なら真を返します。 -
REXML
:: SAX2Listener # processing _ instruction(target , data) -> () (18301.0) -
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
XML 処理命令(PI)に対し呼び出されるコールバックメソッドです。
@param target ターゲット名が文字列で渡されます
@param data 処理命令の内容が文字列で渡されます -
Rake
:: Task # inspect -> String (18301.0) -
自身の情報を人間に読める形式で返します。
自身の情報を人間に読める形式で返します。 -
Rake
:: TaskArguments # inspect -> String (18301.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。
@see Hash#inspect -
Range
# inspect -> String (18301.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//} -
Rational
# inspect -> String (18301.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
"(3/5)", "(-17/7)" のように10進数の表記を返します。
@return 有理数の表記にした文字列を返します。
//emlist[例][ruby]{
Rational(5, 8).inspect # => "(5/8)"
Rational(2).inspect # => "(2/1)"
Rational(-8, 6).inspect # => "(-4/3)"
Rational(0.5).inspect # => "(1/2)"
//}
@see Rational#to_s -
Regexp
# inspect -> String (18301.0) -
Regexp#to_s より自然な文字列を返します。
Regexp#to_s より自然な文字列を返します。
//emlist[例][ruby]{
p /^ugou.*?/i.to_s # => "(?i-mx:^ugou.*?)"
p /^ugou.*?/i.inspect # => "/^ugou.*?/i"
//}
@see Regexp#to_s -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (18301.0) -
self のデバッグ用の情報を含んだ文字列を返します。
self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//} -
RubyVM
:: INSTRUCTION _ NAMES -> [String] (18301.0) -
RubyVM の命令シーケンスの名前の一覧を返します。
RubyVM の命令シーケンスの名前の一覧を返します。
@see RubyVM::InstructionSequence -
Set
# inspect -> String (18301.0) -
人間の読みやすい形に表現した文字列を返します。
人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//} -
Singleton
. instance -> object (18301.0) -
そのクラスの唯一のインスタンスを返します。 最初に呼ばれたときはそのインスタンスを生成します。
そのクラスの唯一のインスタンスを返します。
最初に呼ばれたときはそのインスタンスを生成します。
Singleton を include したクラスで定義されますので、
正確には Singleton モジュールのメソッドではありません。 -
Socket
:: Ifaddr # inspect -> String (18301.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。 -
String
# insert(pos , other) -> self (18301.0) -
pos 番目の文字の直前に文字列 other を挿入します。 self[pos, 0] = other と同じ操作です。
pos 番目の文字の直前に文字列 other を挿入します。
self[pos, 0] = other と同じ操作です。
@param pos 文字列を挿入するインデックス
@param other 挿入する文字列
//emlist[例][ruby]{
str = "foobaz"
str.insert(3, "bar")
p str # => "foobarbaz"
//}
@see String#[]= -
String
# inspect -> String (18301.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。
変換された文字列は印字可能な文字のみによって構成されます
現在の実装では、Ruby のリテラル形式を使って、
文字列中の不可視文字をエスケープシーケンスに変換します。
このメソッドは主にデバッグのために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect ... -
StringScanner
# inspect -> String (18301.0) -
StringScannerオブジェクトを表す文字列を返します。
StringScannerオブジェクトを表す文字列を返します。
文字列にはクラス名の他、以下の情報が含まれます。
* スキャナポインタの現在位置。
* スキャン対象の文字列の長さ。
* スキャンポインタの前後にある文字。上記実行例の @ がスキャンポインタを表します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.inspect # => "#<StringScanner 0/11 @ \"test ..... -
Struct
# inspect -> String (18301.0) -
self の内容を人間に読みやすい文字列にして返します。
self の内容を人間に読みやすい文字列にして返します。
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.inspect # => "#<struct Customer name=\... -
Symbol
# inspect -> String (18301.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。
:fred.inspect #=> ":fred" -
Syslog
. # instance -> self (18301.0) -
selfを返します。(旧版との互換性のため)
selfを返します。(旧版との互換性のため) -
Thread
# inspect -> String (18301.0) -
自身を人間が読める形式に変換した文字列を返します。
自身を人間が読める形式に変換した文字列を返します。
//emlist[例][ruby]{
a = Thread.current
a.inspect # => "#<Thread:0x00007fdbaf07ddb0 run>"
b = Thread.new{}
b.inspect # => "#<Thread:0x00007fdbaf8f7d10@(irb):3 dead>"
//} -
Thread
:: Backtrace :: Location # inspect -> String (18301.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
Thread::Backtrace::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 ... -
Time
# inspect -> String (18301.0) -
時刻を文字列に変換した結果を返します。
時刻を文字列に変換した結果を返します。
Time#to_s とは異なりナノ秒まで含めて返します。
//emlist[][ruby]{
t = Time.now
t.inspect #=> "2012-11-10 18:16:12.261257655 +0100"
t.strftime "%Y-%m-%d %H:%M:%S.%N %z" #=> "2012-11-10 18:16:12.261257655 +0100"
t.utc.inspect #=> "2012-11-10 1... -
TracePoint
# inspect -> String (18301.0) -
self の状態を人間に読みやすい文字列にして返します。
self の状態を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace = TracePoint.new(:call) do |tp|
p tp.inspect # "#<TracePoint:call `foo'@/path/to/test.rb:1>"
end
trace.enable
foo 1
//} -
TrueClass
# inspect -> String (18301.0) -
常に文字列 "true" を返します。
常に文字列 "true" を返します。
//emlist[例][ruby]{
true.inspect # => "true"
//} -
UnboundMethod
# inspect -> String (18301.0) -
self を読みやすい文字列として返します。
self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect -
VALUE rb
_ class _ instance _ methods(int argc , VALUE *argv , VALUE mod) (18301.0) -
Module#instance_methods の実体。 モジュール mod に定義されている public メソッド名の リストを文字列の配列で返します。
Module#instance_methods の実体。
モジュール mod に定義されている public メソッド名の
リストを文字列の配列で返します。 -
VALUE rb
_ class _ new _ instance(int argc , VALUE *argv , VALUE klass) (18301.0) -
Class#new の実体です。
Class#new の実体です。 -
VALUE rb
_ class _ private _ instance _ methods(int argc , VALUE *argv , VALUE mod) (18301.0) -
Module#private_instance_methods の実体。 モジュール mod に定義されている private メソッド名の リストを文字列の配列で返します。
Module#private_instance_methods の実体。
モジュール mod に定義されている private メソッド名の
リストを文字列の配列で返します。 -
VALUE rb
_ class _ protected _ instance _ methods(int argc , VALUE *argv , VALUE mod) (18301.0) -
Module#protected_instance_methods の実体。 モジュール mod に定義されている protected メソッド名の リストを文字列の配列で返します。
Module#protected_instance_methods の実体。
モジュール mod に定義されている protected メソッド名の
リストを文字列の配列で返します。 -
VALUE rb
_ inspect(VALUE obj) (18301.0) -
obj.inspect の実体。
obj.inspect の実体。 -
VALUE rb
_ obj _ instance _ eval(int argc , VALUE *argv , VALUE self) (18301.0) -
-
VALUE rb
_ obj _ instance _ variables(VALUE obj) (18301.0) -
-
VALUE rb
_ obj _ is _ instance _ of(VALUE obj , VALUE klass) (18301.0) -
obj がクラス klass のインスタンスならば真。
obj がクラス klass のインスタンスならば真。 -
VALUE rb
_ obj _ remove _ instance _ variable(VALUE obj , VALUE name) (18301.0) -
-
Vector
# inspect -> String (18301.0) -
オブジェクトの内容を文字列化します。
オブジェクトの内容を文字列化します。 -
WEBrick
:: HTTPServlet :: AbstractServlet . get _ instance(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (18301.0) -
new(server, *options) を呼び出してサーブレットを生成して返します。 WEBrick::HTTPServer オブジェクトは実際にはこの get_instance メソッドを呼び出して サーブレットを生成します。
new(server, *options) を呼び出してサーブレットを生成して返します。
WEBrick::HTTPServer オブジェクトは実際にはこの get_instance メソッドを呼び出して
サーブレットを生成します。
特に理由が無い限り AbstractServlet のサブクラスがこのメソッドを再定義する必要はありません。
@param server WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。
@param options WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのま... -
WEBrick
:: HTTPServlet :: ProcHandler # get _ instance(server , *options) -> self (18301.0) -
何もせずに自身を返します。
何もせずに自身を返します。
@param server WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。
@param options WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。
@see WEBrick::HTTPServlet::AbstractServlet.get_instance -
WIN32OLE
_ TYPE # inspect -> String (18301.0) -
selfを説明的な文字列で表現します。
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 -
Win32
:: Registry # inspect (18301.0) -
@todo
@todo -
Zlib
:: GzipFile :: Error # inspect -> String (18301.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。 -
int rb
_ is _ instance _ id(ID id) (18301.0) -
インスタンス変数名として有効な ID ならば真。
インスタンス変数名として有効な ID ならば真。 -
int st
_ insert(register st _ table *table , register char *key , char *value) (18301.0) -
ハッシュに key と value の組を追加する。 古いライブラリなので void* のかわりに char* を使っている。
ハッシュに key と value の組を追加する。
古いライブラリなので void* のかわりに char* を使っている。 -
main
. inspect -> "main" (18301.0) -
"main" を返します。
"main" を返します。 -
static VALUE method
_ inspect(VALUE method) (18301.0) -
-
static VALUE rb
_ class _ allocate _ instance(VALUE klass) (18301.0) -
Class#allocate の実体です。
Class#allocate の実体です。 -
static VALUE rb
_ obj _ inspect(VALUE obj) (18301.0) -
Object#inspect の実体です。
Object#inspect の実体です。 -
static VALUE rb
_ thread _ inspect(VALUE thread) (18301.0) -
-
Digest
:: Instance (18001.0) -
-
Gem
:: Commands :: InstallCommand (18001.0) -
Gem パッケージをローカルリポジトリにインストールするためのクラスです。
Gem パッケージをローカルリポジトリにインストールするためのクラスです。 -
Gem
:: Commands :: UninstallCommand (18001.0) -
Gem パッケージをアンインストールするためのクラスです。
Gem パッケージをアンインストールするためのクラスです。 -
Gem
:: DependencyInstaller (18001.0) -
ある Gem が依存している Gem を同時にインストールするためのクラスです。
ある Gem が依存している Gem を同時にインストールするためのクラスです。 -
Gem
:: InstallError (18001.0) -
何らかの理由で Gem をインストール出来なかった場合に使用する例外です。
何らかの理由で Gem をインストール出来なかった場合に使用する例外です。 -
Gem
:: InstallUpdateOptions (18001.0) -
Gem::Command で使用するインストールとアップデートに関するオプションを 扱うためのモジュールです。
Gem::Command で使用するインストールとアップデートに関するオプションを
扱うためのモジュールです。 -
Gem
:: Installer (18001.0) -
Gem::Installer は Gem を展開し、 Gem に含まれていたファイルを ファイルシステム上の正しい位置に配置します。
Gem::Installer は Gem を展開し、 Gem に含まれていたファイルを
ファイルシステム上の正しい位置に配置します。
また、gemspec を specifications ディレクトリに、キャッシュを cache ディレクトリに、
実行ファイルやシンボリックリンクなどを bin ディレクトリに配置します。 -
Gem
:: RemoteInstallationCancelled (18001.0) -
???
??? -
Gem
:: RemoteInstallationSkipped (18001.0) -
???
??? -
Gem
:: Uninstaller (18001.0) -
Gem のアンインストールを行うためのクラスです。
Gem のアンインストールを行うためのクラスです。 -
IRB
:: Inspector (18001.0) -
実行結果の出力を行うためのクラスです。
実行結果の出力を行うためのクラスです。 -
Net
:: HTTPInsufficientStorage (18001.0) -
HTTP レスポンス 507 (Insufficient Storage) を表現するクラスです。
HTTP レスポンス 507 (Insufficient Storage) を表現するクラスです。
詳しくは 4918 を見てください。 -
REXML
:: Instruction (18001.0) -
XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
XML 処理命令(XML Processing Instruction, XML PI)を表すクラス。
XML 処理命令 とは XML 文書中の <? と ?> で挟まれた部分のことで、
アプリケーションへの指示を保持するために使われます。
XML 宣言(文書先頭の <?xml version=... ?>)はXML処理命令ではありませんが、
似た見た目を持っています。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="utf-... -
RubyVM
:: InstructionSequence (18001.0) -
Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
Method、Proc オブジェクトや Ruby のソースコードを表す文字列
から VM の命令シーケンスを得る事ができます。また、
RubyVM::InstructionSequence オブジェクトを元に命令シーケンスを読みやす
い文字列に変換する事もできます。Ruby の命令シーケンスコンパイラの設定を
扱う必要がありますが、Ruby の VM がどのように働くかを知るのに有用です。
VM の命令シーケンスの一覧はRuby のソースコード中の insns.def から参照で
きます。
... -
irb
/ inspector (18001.0) -
irb コマンドで実行結果の出力方式(inspect_mode)を定義するためのサブライ ブラリです。
irb コマンドで実行結果の出力方式(inspect_mode)を定義するためのサブライ
ブラリです。 -
rubygems
/ commands / install _ command (18001.0) -
Gem パッケージをローカルリポジトリにインストールするためのライブラリです。
Gem パッケージをローカルリポジトリにインストールするためのライブラリです。
Usage: gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options]
Options:
--platform PLATFORM 指定されたプラットフォームの Gem パッケージをインストールします
-v, --version VERSION 指定されたバージョンの Gem パッケージをインストールします
Install/Update Op... -
rubygems
/ commands / uninstall _ command (18001.0) -
Gem パッケージをアンインストールするためのライブラリです。
Gem パッケージをアンインストールするためのライブラリです。
Usage: gem uninstall GEMNAME [GEMNAME ...] [options]
Options:
-a, --[no-]all Uninstall all matching versions
-I, --[no-]ignore-dependencies Ignore dependency requirements while
uninstalling
-x, --... -
rubygems
/ dependency _ installer (18001.0) -
ある Gem が依存している Gem を同時にインストールするためのライブラリです。
ある Gem が依存している Gem を同時にインストールするためのライブラリです。 -
rubygems
/ install _ update _ options (18001.0) -
Gem::Command で使用するインストールとアップデートに関するオプションを 扱うためのモジュールを定義したライブラリです。
Gem::Command で使用するインストールとアップデートに関するオプションを
扱うためのモジュールを定義したライブラリです。 -
rubygems
/ installer (18001.0) -
RubyGems の Gem をインストールするためのライブラリです。
RubyGems の Gem をインストールするためのライブラリです。 -
rubygems
/ uninstaller (18001.0) -
Gem のアンインストールを行うためのライブラリです。
Gem のアンインストールを行うためのライブラリです。 -
Forwardable
# def _ instance _ delegator(accessor , method , ali = method) -> () (9301.0) -
メソッドの委譲先を設定します。
メソッドの委譲先を設定します。
@param accessor 委譲先のオブジェクト
@param method 委譲先のメソッド
@param ali 委譲元のメソッド
委譲元のオブジェクトで ali が呼び出された場合に、
委譲先のオブジェクトの method へ処理が委譲されるようになります。
委譲元と委譲先のメソッド名が同じ場合は, ali を省略することが可能です。
def_delegator は def_instance_delegator の別名になります。
//emlist[例][ruby]{
require 'forwardable'
class MyQue... -
Forwardable
# def _ instance _ delegators(accessor , *methods) -> () (9301.0) -
メソッドの委譲先をまとめて設定します。
メソッドの委譲先をまとめて設定します。
@param accessor 委譲先のオブジェクト
@param methods 委譲するメソッドのリスト
委譲元のオブジェクトで methods のそれぞれのメソッドが呼び出された場合に、
委譲先のオブジェクトの同名のメソッドへ処理が委譲されるようになります。
def_delegators は def_instance_delegators の別名になります。
また、以下の 2 つの例は同じ意味です。
def_delegators :@records, :size, :<<, :map
def_delegator :@reco... -
Forwardable
# instance _ delegate(hash) -> () (9301.0) -
メソッドの委譲先を設定します。
メソッドの委譲先を設定します。
@param hash 委譲先のメソッドがキー、委譲先のオブジェクトが値の
Hash を指定します。キーは Symbol、
String かその配列で指定します。
//emlist[例][ruby]{
require 'forwardable'
class Zap
extend Forwardable
delegate :length => :@str
delegate [:first, :last] => :@arr
def initialize
@arr =... -
Gem
:: DependencyInstaller . new(options = {}) -> Gem :: DependencyInstaller (9301.0) -
自身を初期化します。
自身を初期化します。
オプションとして以下のものを利用できます。
: :cache_dir
*.gem ファイルを保存するディレクトリを指定します。
: :domain
:local (カレントディレクトリのみ検索します), :remote (Gem.sources を検索します),
:both (:local, :remote の両方を検索します) のいずれかを指定可能です。
: :env_shebang
Gem::Installer.new を参照してください。
: :force
バージョンチェックとセキュリティポリシーのチェックを行わずにインストールを実行します... -
Gem
:: Installer . new(gem , options = {}) -> Gem :: Installer (9301.0) -
@todo 書いてないオプションがいっぱいある
@todo 書いてないオプションがいっぱいある
与えられた引数で自身を初期化します。
@param gem インストール対象の Gem のパスを指定します。
@param options インストーラが使用するオプションをハッシュで指定します。
使用できるキーは以下の通りです。
: :env_shebang
コマンドのラッパーで shebang line に /usr/bin/env を使用します。
: :force
署名された Gem のみをインストールするというポリシー以外、
全てのバージョンチェックとセキュリティポリシーのチェックを行わない... -
OpenSSL
:: HMAC # inspect -> String (9301.0) -
オブジェクトの内部状態から算出された HMAC を 16進の文字列で返します。
オブジェクトの内部状態から算出された HMAC を
16進の文字列で返します。 -
REXML
:: Instruction # clone -> REXML :: Instruction (9301.0) -
self を複製します。
self を複製します。 -
REXML
:: Instruction . new(target , content = nil) -> REXML :: Instruction (9301.0) -
新たな Instruction オブジェクトを生成します。
新たな Instruction オブジェクトを生成します。
@param target ターゲット
@param content 内容 -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (9301.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (9301.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file ファイル名を文字列で指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::Instr... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (9301.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起こします。
他者により提供されたバイナリデータはロードすべきではありません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM:... -
RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (9301.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (9301.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 body で指定した Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def ... -
ARGF
. class # to _ s -> String (9001.0) -
常に文字列 "ARGF" を返します。
常に文字列 "ARGF" を返します。 -
Array
# to _ s -> String (9001.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
[1, 2, 3, 4].to_s # => "[1, 2, 3, 4]"
[1, 2, 3, 4].inspect # => "[1, 2, 3, 4]"
//} -
Data
# to _ s -> String (9001.0) -
self の内容を人間に読みやすい文字列にして返します。
self の内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
Customer = Data.define(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
joe.inspect # => "#<data Customer name=\"Joe Smith\", address=\"123 Maple, Anytown NC\", zip=12345>"
//}
[注意] 本メソッドの記述は Data のサブクラスのインスタンスに... -
FalseClass
# to _ s -> String (9001.0) -
常に文字列 "false" を返します。
常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//}