ライブラリ
- ビルトイン (71)
- bigdecimal (1)
- csv (3)
- ipaddr (1)
-
irb
/ context (6) -
irb
/ inspector (2) - matrix (2)
-
net
/ smtp (1) - openssl (1)
- optparse (1)
- ostruct (2)
- pp (2)
- rake (5)
-
rake
/ gempackagetask (3) -
rdoc
/ context (1) -
rdoc
/ markup (1) -
rubygems
/ commands / build _ command (1) -
rubygems
/ commands / dependency _ command (2) -
rubygems
/ commands / lock _ command (1) -
rubygems
/ commands / which _ command (1) -
rubygems
/ dependency _ installer (1) -
rubygems
/ dependency _ list (5) -
rubygems
/ format (2) -
rubygems
/ gem _ path _ searcher (6) -
rubygems
/ indexer (4) -
rubygems
/ installer (4) -
rubygems
/ old _ format (2) -
rubygems
/ package / tar _ input (2) -
rubygems
/ remote _ fetcher (1) -
rubygems
/ require _ paths _ builder (1) -
rubygems
/ requirement (1) -
rubygems
/ server (2) -
rubygems
/ source _ index (10) -
rubygems
/ source _ info _ cache (1) -
rubygems
/ spec _ fetcher (11) -
rubygems
/ specification (97) -
rubygems
/ uninstaller (7) -
rubygems
/ validator (1) - set (2)
- socket (4)
- strscan (1)
-
win32
/ registry (1) - win32ole (1)
- zlib (1)
クラス
-
ARGF
. class (4) - Addrinfo (2)
- Array (2)
- BasicObject (3)
- BigDecimal (1)
- Binding (1)
- CSV (1)
-
CSV
:: Row (1) -
CSV
:: Table (1) - Complex (1)
- Dir (1)
- Encoding (1)
-
Encoding
:: Converter (1) -
Enumerator
:: ArithmeticSequence (1) -
Enumerator
:: Chain (1) - Exception (1)
- FalseClass (2)
- Float (2)
-
Gem
:: Commands :: BuildCommand (1) -
Gem
:: Commands :: DependencyCommand (2) -
Gem
:: Commands :: LockCommand (1) -
Gem
:: Commands :: WhichCommand (1) -
Gem
:: DependencyInstaller (1) -
Gem
:: DependencyList (5) -
Gem
:: Format (2) -
Gem
:: GemPathSearcher (6) -
Gem
:: Indexer (4) -
Gem
:: Installer (4) -
Gem
:: OldFormat (2) -
Gem
:: Package :: TarInput (2) -
Gem
:: RemoteFetcher (1) -
Gem
:: Requirement (1) -
Gem
:: Server (2) -
Gem
:: SourceIndex (10) -
Gem
:: SourceInfoCache (1) -
Gem
:: SpecFetcher (11) -
Gem
:: Specification (97) -
Gem
:: Uninstaller (7) -
Gem
:: Validator (1) - Hash (2)
- IPAddr (1)
-
IRB
:: Context (6) -
IRB
:: Inspector (2) - Integer (2)
- MatchData (1)
- Matrix (1)
- Method (6)
- Module (9)
-
Net
:: SMTP (1) - Object (6)
-
OpenSSL
:: HMAC (1) - OpenStruct (2)
-
OptionParser
:: ParseError (1) - Proc (2)
-
Process
:: Status (1) -
RDoc
:: Context :: Section (1) -
RDoc
:: Markup (1) -
Rake
:: FileList (1) -
Rake
:: GemPackageTask (3) -
Rake
:: Task (1) -
Rake
:: TaskArguments (2) - Range (4)
- Rational (1)
- Regexp (2)
-
RubyVM
:: AbstractSyntaxTree :: Node (1) -
RubyVM
:: InstructionSequence (1) - Set (2)
-
Socket
:: AncillaryData (1) -
Socket
:: Ifaddr (1) - String (2)
- StringScanner (1)
- Struct (2)
- Symbol (2)
- Thread (3)
-
Thread
:: Backtrace :: Location (1) - Time (1)
- TracePoint (1)
- TrueClass (1)
- UnboundMethod (2)
- Vector (1)
-
WIN32OLE
_ TYPE (1) -
Win32
:: Registry (1) -
Zlib
:: GzipFile :: Error (1)
モジュール
キーワード
- === (4)
- [] (1)
-
_ _ inspect _ _ (1) -
_ dump (1) - abbreviate (1)
- add (1)
-
add
_ bindir (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ runtime _ dependency (1) -
add
_ spec (1) -
add
_ special (1) -
add
_ specs (1) -
alias
_ method (1) -
ask
_ if _ ok (1) -
assign
_ defaults (1) - autorequire (1)
- autorequire= (1)
- bindir (1)
- bindir= (1)
-
cache
_ dir (1) - call (2)
-
cert
_ chain (1) -
cert
_ chain= (1) -
collect
_ specs (1) -
compact
_ specs (1) - date (1)
- date= (1)
-
default
_ executable (1) -
default
_ executable= (1) - dependencies (1)
-
dependencies
_ ok? (1) -
dependency
_ order (1) -
dependent
_ gems (1) -
deprecate
_ constant (1) - description (1)
- description= (1)
-
development
_ dependencies (1) - dir (1)
- download (1)
- email (1)
- email= (1)
- encoding (1)
-
ensure
_ dependency (1) - executable (1)
- executable= (1)
- executables (1)
- executables= (1)
- extensions (1)
- extensions= (1)
-
extra
_ rdoc _ files (1) -
extra
_ rdoc _ files= (1) - fetch (1)
-
fetch
_ spec (1) -
file
_ name (1) - files (1)
- files= (1)
- find (1)
-
find
_ all (1) -
find
_ matching (1) -
find
_ name (2) -
find
_ reverse _ dependencies (1) -
find
_ spec _ by _ name _ and _ version (1) -
full
_ gem _ path (1) -
full
_ name (1) -
gem
_ paths (1) -
gem
_ spec (1) -
gem
_ spec= (1) -
has
_ rdoc (1) -
has
_ rdoc= (1) -
has
_ rdoc? (1) -
has
_ test _ suite? (1) -
has
_ unit _ tests? (1) - homepage (1)
- homepage= (1)
- include? (1)
- init (2)
-
init
_ gemspecs (1) -
inplace
_ mode (1) -
inplace
_ mode= (1) - inspect (54)
- inspect? (1)
-
inspect
_ mode (1) -
inspect
_ mode= (1) -
inspect
_ sockaddr (1) -
inspect
_ value (1) - install (1)
-
installation
_ path (1) -
instance
_ eval (2) -
ip
_ pktinfo (1) -
ipv6
_ unspecified? (1) -
latest
_ specs (3) -
legacy
_ repos (1) -
lib
_ dirs _ for (1) -
lib
_ files (1) - list (1)
-
load
_ gems _ in (1) -
load
_ gemspec (1) -
load
_ gemspecs (1) -
load
_ specs (1) - loaded= (1)
- loaded? (1)
-
loaded
_ from (1) -
loaded
_ from= (1) -
mark
_ version (1) -
matching
_ file? (1) -
matching
_ files (1) - member? (1)
- name (2)
- name= (1)
- normalize (1)
-
original
_ name (1) -
original
_ platform (1) -
original
_ platform= (1) -
path
_ ok? (1) - pathmap (2)
- platform (1)
- platform= (1)
-
pretty
_ inspect (1) -
pretty
_ print _ inspect (1) -
print
_ dependencies (1) - private (1)
- protected (1)
- public (1)
- remove (1)
-
remove
_ by _ name (1) -
remove
_ executables (1) -
remove
_ spec (1) -
require
_ path (1) -
require
_ path= (1) -
require
_ paths (1) -
require
_ paths= (1) -
required
_ ruby _ version (1) -
required
_ ruby _ version= (1) -
required
_ rubygems _ version (1) -
required
_ rubygems _ version= (1) - requirements (1)
- requirements= (1)
-
rubygems
_ version (1) -
rubygems
_ version= (1) -
runtime
_ dependencies (1) -
safe
_ level (1) - sanitize (1)
-
satisfies
_ requirement? (1) - search (2)
- send (2)
-
signing
_ key (1) -
signing
_ key= (1) -
singleton
_ method _ undefined (1) -
source
_ location (1) - spec= (2)
-
spec
_ dirs (1) -
spec
_ dirs= (1) -
spec
_ path (1) -
spec
_ predecessors (1) - specific? (1)
- specification (1)
-
specification
_ version (1) -
specification
_ version= (1) - specs (2)
- summary (1)
- summary= (1)
-
test
_ file (1) -
test
_ file= (1) -
test
_ files (1) -
test
_ files= (1) -
test
_ suite _ file (1) -
test
_ suite _ file= (1) -
to
_ proc (1) -
to
_ ruby (1) -
to
_ s (16) -
uninstall
_ gem (1) -
unit
_ test (1) - validate (1)
- version (1)
- version= (1)
-
warn
_ legacy (1) -
write
_ require _ paths _ file _ if _ needed (1) -
write
_ spec (1) -
yaml
_ initialize (1)
検索結果
先頭5件
-
Gem
:: Format # spec -> Gem :: Specification (54607.0) -
Gem の Gem::Specification を返します。
Gem の Gem::Specification を返します。 -
Gem
:: Installer # spec -> Gem :: Specification (54607.0) -
インストールしようとしている Gem に対応する Gem::Specification のインスタンスを返します。
インストールしようとしている Gem に対応する Gem::Specification のインスタンスを返します。 -
Gem
:: OldFormat # spec -> Gem :: Specification (54607.0) -
Gem の Gem::Specification を返します。
Gem の Gem::Specification を返します。 -
Gem
:: Uninstaller # spec -> Gem :: Specification (54607.0) -
Gem::Uninstaller#uninstall_gem の実行中のみセットされます。
Gem::Uninstaller#uninstall_gem の実行中のみセットされます。 -
Gem
:: SpecFetcher # fetch _ spec(spec , source _ uri) -> object (27628.0) -
@todo
@todo
@param spec
@param source_uri -
Gem
:: SpecFetcher # latest _ specs -> Hash (27304.0) -
キャッシュされている最新の gemspec を返します。
キャッシュされている最新の gemspec を返します。 -
Gem
:: SpecFetcher # load _ specs(source _ uri , file) -> object (27304.0) -
指定された source_uri, file から gemspec をロードします。
指定された source_uri, file から gemspec をロードします。
また、内部ではキャッシュの更新も行っています。
@param source_uri gemspec の置いてある URI を指定します。
@param file gemspec のファイル名を指定します。 -
Gem
:: SpecFetcher # specs -> Hash (27304.0) -
キャッシュされている全ての gemspec を返します。
キャッシュされている全ての gemspec を返します。 -
Gem
:: Specification # specification _ version -> Integer (27304.0) -
この Gem パッケージに用いられている gemspec のバージョンを返します。
この Gem パッケージに用いられている gemspec のバージョンを返します。 -
Gem
:: Specification # specification _ version=(version) (27304.0) -
この Gem パッケージに用いられている gemspec のバージョンをセットします。
この Gem パッケージに用いられている gemspec のバージョンをセットします。
@param version gemspec のバージョンを指定します。
@see Gem::Specification::SPECIFICATION_VERSION_HISTORY -
IRB
:: Inspector # inspect _ value(v) -> () (27304.0) -
ライブラリ内部で使用します。
ライブラリ内部で使用します。 -
Gem
:: SourceIndex # add _ spec(gem _ spec) -> Gem :: Specification (18928.0) -
自身に引数で与えられた Gem::Specification のインスタンスを追加します。
自身に引数で与えられた Gem::Specification のインスタンスを追加します。
@param gem_spec Gem::Specification のインスタンスを指定します。 -
Gem
:: Format # spec=(spec) (18628.0) -
Gem の Gem::Specification をセットします。
Gem の Gem::Specification をセットします。
@param spec Gem の Gem::Specification をセットします。 -
Gem
:: OldFormat # spec=(spec) (18628.0) -
Gem の Gem::Specification をセットします。
Gem の Gem::Specification をセットします。
@param spec Gem の Gem::Specification をセットします。 -
Rake
:: GemPackageTask # gem _ spec=(gem _ spec) (18628.0) -
gemspec をセットします。
gemspec をセットします。
@param gem_spec Gem::Specification のインスタンスを指定します。 -
Gem
:: SourceIndex # remove _ spec(full _ name) -> Gem :: Specification (18607.0) -
引数で指定された名前を持つ Gem をインデックスから削除します。
引数で指定された名前を持つ Gem をインデックスから削除します。 -
Rake
:: GemPackageTask # gem _ spec -> Gem :: Specification (18607.0) -
package ターゲットで使用する gemspec を返します。
package ターゲットで使用する gemspec を返します。
gemspec にはパッケージ名、バージョン、パッケージに含まれるファイルなどが定義
されているので、それらを明示的に指定する必要はありません。 -
Gem
:: GemPathSearcher # init _ gemspecs -> [Gem :: Specification] (18604.0) -
インストール済みの Gem の Gem::Specification のリストを返します。
インストール済みの Gem の Gem::Specification のリストを返します。
リストはアルファベット順かつバージョンの新しい順にソートされています。 -
Gem
:: Indexer # compact _ specs(specs) -> Array (18604.0) -
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して 返します。
与えられたスペックを元にスペックを一意に特定できるだけの情報を持った配列を作成して
返します。
@param specs Gem::Specification の配列を指定します。 -
Gem
:: Package :: TarInput # load _ gemspec(io) -> Gem :: Specification | nil (18604.0) -
YAML 形式の gemspec を io から読み込みます。
YAML 形式の gemspec を io から読み込みます。
@param io 文字列か IO オブジェクトを指定します。
@see Gem::Specification.from_yaml -
Gem
:: SourceIndex # add _ specs(*gem _ specs) -> Hash (18604.0) -
自身に引数で与えられた Gem::Specification のインスタンスを全て追加します。
自身に引数で与えられた Gem::Specification のインスタンスを全て追加します。
@param gem_specs 複数の Gem::Specification のインスタンスを指定します。 -
Gem
:: SourceIndex # specification(full _ name) -> Gem :: Specification | nil (18604.0) -
指定された名前の Gem::Specification オブジェクトを返します。
指定された名前の Gem::Specification オブジェクトを返します。
@param full_name Gem のフルネームを指定します。 -
Gem
:: DependencyList # spec _ predecessors -> Hash (18343.0) -
@todo ???
@todo ???
Return a hash of predecessors. <tt>result[spec]</tt> is an
Array of gemspecs that have a dependency satisfied by the named
spec. -
Gem
:: Commands :: LockCommand # spec _ path(gem _ full _ name) -> String (18307.0) -
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
指定された Gem パッケージの gemspec ファイルのフルパスを返します。
@param gem_full_name Gem パッケージの名前を指定します。 -
Gem
:: DependencyInstaller # find _ spec _ by _ name _ and _ version(gem _ name , version = Gem :: Requirement . default) -> Array (18307.0) -
与えられた Gem の名前とバージョンに関する条件にマッチする Gem::Specification と それの存在する URI を含む配列を返します。
与えられた Gem の名前とバージョンに関する条件にマッチする Gem::Specification と
それの存在する URI を含む配列を返します。
@param gem_name Gem の名前を指定します。
@param version Gem が満たすバージョンに関する条件を指定します。 -
Gem
:: Installer # write _ spec (18307.0) -
Ruby スクリプト形式で .gemspec ファイルを作成します。
Ruby スクリプト形式で .gemspec ファイルを作成します。 -
Gem
:: SourceIndex # spec _ dirs -> [String] (18307.0) -
Gem::SourceIndex#refresh! で自身を更新する時に使用するディレクトリを取得します。
Gem::SourceIndex#refresh! で自身を更新する時に使用するディレクトリを取得します。 -
Gem
:: SourceIndex # spec _ dirs=(dirs) (18307.0) -
Gem::SourceIndex#refresh! で自身を更新する時に使用するディレクトリを設定します。
Gem::SourceIndex#refresh! で自身を更新する時に使用するディレクトリを設定します。 -
ARGF
. class # inspect -> String (18304.0) -
常に文字列 "ARGF" を返します。
常に文字列 "ARGF" を返します。 -
Addrinfo
# inspect _ sockaddr -> String (18304.0) -
アドレスやポート番号などの情報を人間に読める形の文字列で返します。
アドレスやポート番号などの情報を人間に読める形の文字列で返します。
require 'socket'
Addrinfo.tcp("localhost", 80).inspect_sockaddr #=> "127.0.0.1:80"
Addrinfo.tcp("ip6-localhost", 80).inspect_sockaddr #=> "[::1]:80"
Addrinfo.unix("/tmp/sock").inspect_sockaddr #=> "/tmp/sock" -
Addrinfo
# ipv6 _ unspecified? -> bool (18304.0) -
IPv6 の不特定アドレス(unspecified address)(::)であれば真を返します。
IPv6 の不特定アドレス(unspecified address)(::)であれば真を返します。 -
Array
# inspect -> String (18304.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
[1, 2, 3, 4].to_s # => "[1, 2, 3, 4]"
[1, 2, 3, 4].inspect # => "[1, 2, 3, 4]"
//} -
BigDecimal
# inspect -> String (18304.0) -
BigDecimal オブジェクトを表す文字列を返します。
BigDecimal オブジェクトを表す文字列を返します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1234.5678").inspect
# => "0.12345678e4"
//} -
CSV
# inspect -> String (18304.0) -
ASCII 互換文字列で自身の情報を表したものを返します。
ASCII 互換文字列で自身の情報を表したものを返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\nrow1_1,row1_2")
csv.inspect # => "<#CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\">"
//} -
CSV
:: Row # inspect -> String (18304.0) -
ASCII 互換であるエンコーディングの文字列で自身の情報を返します。
ASCII 互換であるエンコーディングの文字列で自身の情報を返します。
//emlist[例][ruby]{
require "csv"
row = CSV::Row.new(["header1", "header2", "header1"], [1, 2, 3])
row.inspect # => "#<CSV::Row \"header1\":1 \"header2\":2 \"header1\":3>"
//} -
CSV
:: Table # inspect -> String (18304.0) -
モードとサイズを US-ASCII な文字列で返します。
モードとサイズを US-ASCII な文字列で返します。
//emlist[][ruby]{
require 'csv'
csv = CSV.new("a,b,c\n1,2,3", headers: true)
table = csv.read
p table.inspect # => "#<CSV::Table mode:col_or_row row_count:2>"
//} -
Complex
# inspect -> String (18304.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
//emlist[例][ruby]{
Complex(2).inspect # => "(2+0i)"
Complex('-8/6').inspect # => "((-4/3)+0i)"
Complex('1/2i').inspect # => "(0+(1/2)*i)"
Complex(0, Float::INFINITY).inspect # => "(0+Infinity*i)"
Complex(Float:... -
Dir
# inspect -> String (18304.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
Dir.open("/") { |d| d.inspect } # => "#<Dir:/>"
//} -
Encoding
# inspect -> String (18304.0) -
プログラマにわかりやすい表現の文字列を返します。
プログラマにわかりやすい表現の文字列を返します。
//emlist[例][ruby]{
Encoding::UTF_8.inspect #=> "#<Encoding:UTF-8>"
Encoding::ISO_2022_JP.inspect #=> "#<Encoding:ISO-2022-JP (dummy)>"
//} -
Encoding
:: Converter # inspect -> String (18304.0) -
Encoding::Converter オブジェクトの情報を簡単に表示します。
Encoding::Converter オブジェクトの情報を簡単に表示します。
@return 変換器の情報を簡単に可視化した文字列です。 -
Enumerator
:: ArithmeticSequence # inspect -> String (18304.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。 -
Enumerator
:: Chain # inspect -> String (18304.0) -
self を人間が読みやすい形式で文字列として返します。
self を人間が読みやすい形式で文字列として返します。 -
Exception
# inspect -> String (18304.0) -
self のクラス名と message を文字列にして返します。
self のクラス名と message を文字列にして返します。
//emlist[例][ruby]{
begin
raise "exception"
rescue
p $!.inspect # => "#<RuntimeError: exception>"
end
//} -
FalseClass
# inspect -> String (18304.0) -
常に文字列 "false" を返します。
常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//} -
Float
# inspect -> String (18304.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
固定小数点、浮動小数点の形式か、 "Infinity"、"-Infinity"、"NaN" のいず
れかを返します。
@return 文字列を返します。
//emlist[例][ruby]{
0.00001.to_s # => "1.0e-05"
3.14.to_s # => "3.14"
10000_00000_00000.0.to_s # => "100000000000000.0"
10000_00000_00000_00000.0.to_s # => "1.0e+19"
... -
Gem
:: Commands :: BuildCommand # load _ gemspecs(filename) -> Array (18304.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename ファイル名を指定します。 -
Gem
:: Indexer # collect _ specs -> Gem :: SourceIndex (18304.0) -
Gem のキャッシュディレクトリ内の *.gem ファイルから Gem::Specification を集めます。
Gem のキャッシュディレクトリ内の *.gem ファイルから Gem::Specification を集めます。 -
Gem
:: Requirement # specific? -> bool (18304.0) -
条件に上限のある指定で、最新のバージョンにマッチしない可能性のある場合は、true を返します。
条件に上限のある指定で、最新のバージョンにマッチしない可能性のある場合は、true を返します。
//emlist[][ruby]{
p Gem::Requirement.new(">= 3").specific? # => false
p Gem::Requirement.new("~> 3").specific? # => true
p Gem::Requirement.new("= 3").specific? # => true
//} -
Gem
:: Server # latest _ specs(request , response) -> () (18304.0) -
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
@param request WEBrick::HTTPRequest オブジェクトが自動的に指定されます。
@param response WEBrick::HTTPResponse オブジェクトが自動的に指定されます。 -
Gem
:: Server # specs(request , response) -> () (18304.0) -
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
メソッド名に対応する URI に対するリクエストを処理するメソッドです。
@param request WEBrick::HTTPRequest オブジェクトが自動的に指定されます。
@param response WEBrick::HTTPResponse オブジェクトが自動的に指定されます。 -
Gem
:: SourceIndex # latest _ specs -> Array (18304.0) -
自身に含まれる最新の Gem::Specification のリストを返します。
自身に含まれる最新の Gem::Specification のリストを返します。 -
Hash
# inspect -> String (18304.0) -
ハッシュの内容を人間に読みやすい文字列にして返します。
ハッシュの内容を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
h = { "c" => 300, "a" => 100, "d" => 400 }
h.inspect # => "{\"c\"=>300, \"a\"=>100, \"d\"=>400}"
//} -
IPAddr
# inspect -> String (18304.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
オブジェクトを人間が読める形式に変換した文字列を返します。 -
IRB
:: Context # _ _ inspect _ _ -> String (18304.0) -
自身を文字列表現にしたオブジェクトを返します。
自身を文字列表現にしたオブジェクトを返します。 -
IRB
:: Context # inspect -> String (18304.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。 -
IRB
:: Context # inspect? -> bool (18304.0) -
IRB::Context#inspect_mode が有効かどうかを返します。
IRB::Context#inspect_mode が有効かどうかを返します。
@return 出力結果に to_s したものを表示する場合は false を返します。それ
以外の場合は true を返します。
@see IRB::Context#inspect_mode, IRB::Context#inspect_mode= -
IRB
:: Context # inspect _ mode -> object | nil (18304.0) -
実行結果の出力方式を返します。
実行結果の出力方式を返します。
@see IRB::Context#inspect_mode= -
IRB
:: Context # inspect _ mode=(opt) (18304.0) -
実行結果の出力方式を opt に設定します。
実行結果の出力方式を opt に設定します。
@param opt 以下のいずれかを指定します。
: false, :to_s, :raw
出力結果を to_s したものを表示します。
: true, :p, :inspect
出力結果を inspect したものを表示します。
: :pp, :pretty_inspect
出力結果を pretty_inspect したものを表示します。
: :yaml, :YAML
出力結果を YAML 形式にしたものを表示します。
: :marshal, :Marshal, :MARSHAL, Marshal
出力結果を Marsh... -
Integer
# inspect(base=10) -> String (18304.0) -
整数を 10 進文字列表現に変換します。
整数を 10 進文字列表現に変換します。
引数を指定すれば、それを基数とした文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数値を指定した場合に発生します。 -
MatchData
# inspect -> String (18304.0) -
self の内容を人間に読みやすい文字列にして返します。
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>.)/.... -
Matrix
# inspect -> String (18304.0) -
自分自身を見やすい形式に文字列化し、その文字列を返します。
自分自身を見やすい形式に文字列化し、その文字列を返します。
//emlist[例][ruby]{
require 'matrix'
a1 = [1, 2]
a2 = [3, 4.5]
m = Matrix[a1, a2]
p m.inspect # => "Matrix[[1, 2], [3, 4.5]]"
//} -
Method
# inspect -> String (18304.0) -
self を読みやすい文字列として返します。
self を読みやすい文字列として返します。
以下の形式の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2 は、実際にそのメソッドを定義しているクラス/モジュール名、
method は、メソッド名を表します。
arg は引数を表します。
「foo.rb:2」は Method#... -
Module
# inspect -> String (18304.0) -
モジュールやクラスの名前を文字列で返します。
モジュールやクラスの名前を文字列で返します。
このメソッドが返す「モジュール / クラスの名前」とは、
より正確には「クラスパス」を指します。
クラスパスとは、ネストしているモジュールすべてを
「::」を使って表示した名前のことです。
クラスパスの例としては「CGI::Session」「Net::HTTP」が挙げられます。
@return 名前のないモジュール / クラスに対しては、name は nil を、それ以外はオブジェクト ID の文字列を返します。
//emlist[例][ruby]{
module A
module B
end
p B.name #=> "A... -
Net
:: SMTP # inspect -> String (18304.0) -
@see Object#inspect
@see Object#inspect -
Object
# inspect -> String (18304.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
オブジェクトを人間が読める形式に変換した文字列を返します。
組み込み関数 Kernel.#p は、このメソッドの結果を使用して
オブジェクトを表示します。
//emlist[][ruby]{
[ 1, 2, 3..4, 'five' ].inspect # => "[1, 2, 3..4, \"five\"]"
Time.new.inspect # => "2008-03-08 19:43:39 +0900"
//}
inspect メソッドをオーバーライドしなかった場合、クラス名とインスタンス
変数の名前、値の組を元にした文字列を返します。
//... -
Object
# pretty _ inspect -> String (18304.0) -
self を pp で表示したときの結果を文字列として返します。
self を pp で表示したときの結果を文字列として返します。 -
Object
# pretty _ print _ inspect -> String (18304.0) -
Object#pretty_print を使って Object#inspect と同様に オブジェクトを人間が読める形式に変換した文字列を返します。
Object#pretty_print を使って Object#inspect と同様に
オブジェクトを人間が読める形式に変換した文字列を返します。
出力する全てのオブジェクトに Object#pretty_print が定義されている必要があります。
そうでない場合には RuntimeError が発生します。
@raise RuntimeError 出力する全てのオブジェクトに Object#pretty_print が定義されて
いない場合に発生します。 -
OpenStruct
# inspect -> String (18304.0) -
オブジェクトを人間が読める形式に変換した文字列を返します。
オブジェクトを人間が読める形式に変換した文字列を返します。
@see Object#inspect -
OptionParser
:: ParseError # inspect -> String (18304.0) -
自身を人間が読みやすい形の文字列表現にして返します。
自身を人間が読みやすい形の文字列表現にして返します。
@return 文字列を返します。
@see Object#inspect -
Proc
# inspect -> String (18304.0) -
self の文字列表現を返します。
self の文字列表現を返します。
可能なら self を生成したソースファイル名、行番号を含みます。
//emlist[例][ruby]{
p Proc.new {
true
}.to_s
# => "#<Proc:0x0x401a880c@-:3>"
//} -
Process
:: Status # inspect -> String (18304.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 (18304.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。 -
RDoc
:: Markup # add _ special(pattern , name) -> () (18304.0) -
pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま す。
pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま
す。
例えば WikiWord のような、SM::SimpleMarkup#add_word_pair、
SM::SimpleMarkup#add_html でフォーマットできないものに対して使用
します。
@param pattern 正規表現を指定します。
@param name SM::ToHtml などのフォーマッタに識別させる時の名前を
Symbol で指定します。
例:
require 'rdoc/markup/simple_markup'
require '... -
Rake
:: Task # inspect -> String (18304.0) -
自身の情報を人間に読める形式で返します。
自身の情報を人間に読める形式で返します。 -
Rake
:: TaskArguments # inspect -> String (18304.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。
@see Hash#inspect -
Range
# inspect -> String (18304.0) -
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド で文字列に変換されます)。
self を文字列に変換します(始端と終端のオブジェクトは #inspect メソッド
で文字列に変換されます)。
@see Range#to_s
//emlist[例][ruby]{
(1..5).inspect # => "1..5"
("1".."5").inspect # => "\"1\"..\"5\""
//} -
Rational
# inspect -> String (18304.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 (18304.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 (18304.0) -
self のデバッグ用の情報を含んだ文字列を返します。
self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//} -
RubyVM
:: InstructionSequence # inspect -> String (18304.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path -
Set
# inspect -> String (18304.0) -
人間の読みやすい形に表現した文字列を返します。
人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
require 'set'
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//} -
Socket
:: Ifaddr # inspect -> String (18304.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。 -
String
# inspect -> String (18304.0) -
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。 変換された文字列は印字可能な文字のみによって構成されます
文字列オブジェクトの内容を、出力したときに人間が読みやすいような適当な形式に変換します。
変換された文字列は印字可能な文字のみによって構成されます
現在の実装では、Ruby のリテラル形式を使って、
文字列中の不可視文字をエスケープシーケンスに変換します。
このメソッドは主にデバッグのために用意されています。
永続化などの目的で文字列をダンプしたいときは、
String#dump を使うべきです。
//emlist[例][ruby]{
# p ではないことに注意
puts "string".inspect # => "string"
puts "\t\r\n".inspect ... -
StringScanner
# inspect -> String (18304.0) -
StringScannerオブジェクトを表す文字列を返します。
StringScannerオブジェクトを表す文字列を返します。
文字列にはクラス名の他、以下の情報が含まれます。
* スキャナポインタの現在位置。
* スキャン対象の文字列の長さ。
* スキャンポインタの前後にある文字。上記実行例の @ がスキャンポインタを表します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.inspect # => "#<StringScanner 0/11 @ \"test ..... -
Struct
# inspect -> String (18304.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 (18304.0) -
自身を人間に読みやすい文字列にして返します。
自身を人間に読みやすい文字列にして返します。
:fred.inspect #=> ":fred" -
Thread
# inspect -> String (18304.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 (18304.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 (18304.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 (18304.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 (18304.0) -
常に文字列 "true" を返します。
常に文字列 "true" を返します。
//emlist[例][ruby]{
true.inspect # => "true"
//} -
UnboundMethod
# inspect -> String (18304.0) -
self を読みやすい文字列として返します。
self を読みやすい文字列として返します。
詳しくは Method#inspect を参照してください。
//emlist[例][ruby]{
String.instance_method(:count).inspect # => "#<UnboundMethod: String#count>"
//}
@see Method#inspect -
Vector
# inspect -> String (18304.0) -
オブジェクトの内容を文字列化します。
オブジェクトの内容を文字列化します。 -
WIN32OLE
_ TYPE # inspect -> String (18304.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 (18304.0) -
@todo
@todo -
Zlib
:: GzipFile :: Error # inspect -> String (18304.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。 -
OpenSSL
:: HMAC # inspect -> String (9304.0) -
オブジェクトの内部状態から算出された HMAC を 16進の文字列で返します。
オブジェクトの内部状態から算出された HMAC を
16進の文字列で返します。 -
ARGF
. class # to _ s -> String (9004.0) -
常に文字列 "ARGF" を返します。
常に文字列 "ARGF" を返します。 -
Array
# to _ s -> String (9004.0) -
自身の情報を人間に読みやすい文字列にして返します。
自身の情報を人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
[1, 2, 3, 4].to_s # => "[1, 2, 3, 4]"
[1, 2, 3, 4].inspect # => "[1, 2, 3, 4]"
//} -
FalseClass
# to _ s -> String (9004.0) -
常に文字列 "false" を返します。
常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//}