種類
ライブラリ
- ビルトイン (138)
- bigdecimal (1)
-
cgi
/ core (1) - csv (3)
- find (2)
- ipaddr (2)
-
irb
/ context (7) -
irb
/ inspector (7) -
irb
/ magic-file (1) - json (2)
- matrix (2)
- monitor (1)
-
net
/ smtp (1) - openssl (2)
- optparse (1)
- ostruct (3)
- pp (2)
- psych (4)
- rake (6)
-
rake
/ gempackagetask (5) -
rdoc
/ context (1) -
rdoc
/ markup (1) -
rexml
/ document (2) -
rubygems
/ builder (1) -
rubygems
/ command (3) -
rubygems
/ commands / build _ command (1) -
rubygems
/ commands / dependency _ command (2) -
rubygems
/ commands / lock _ command (1) -
rubygems
/ commands / specification _ command (1) -
rubygems
/ commands / which _ command (1) -
rubygems
/ dependency _ installer (1) -
rubygems
/ dependency _ list (5) -
rubygems
/ doc _ manager (1) -
rubygems
/ exceptions (1) -
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 (14) -
rubygems
/ source _ info _ cache (2) -
rubygems
/ spec _ fetcher (14) -
rubygems
/ specification (121) -
rubygems
/ uninstaller (7) -
rubygems
/ validator (1) - set (2)
- socket (12)
- strscan (1)
- uri (2)
-
webrick
/ httputils (1) -
win32
/ registry (1) - win32ole (1)
- zlib (1)
クラス
-
ARGF
. class (4) - Addrinfo (3)
- Array (2)
- BasicObject (3)
- BigDecimal (1)
- Binding (1)
- CGI (1)
- CSV (1)
-
CSV
:: Row (1) -
CSV
:: Table (1) - Complex (1)
- Dir (1)
- Encoding (10)
-
Encoding
:: Converter (1) -
Enumerator
:: ArithmeticSequence (1) -
Enumerator
:: Chain (1) - Exception (1)
- FalseClass (2)
- Float (2)
-
Gem
:: Builder (1) -
Gem
:: Command (3) -
Gem
:: Commands :: BuildCommand (1) -
Gem
:: Commands :: DependencyCommand (2) -
Gem
:: Commands :: LockCommand (1) -
Gem
:: Commands :: WhichCommand (1) -
Gem
:: DependencyInstaller (1) -
Gem
:: DependencyList (5) -
Gem
:: DocManager (1) -
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 (14) -
Gem
:: SourceInfoCache (2) -
Gem
:: SpecFetcher (13) -
Gem
:: Specification (120) -
Gem
:: Uninstaller (7) -
Gem
:: Validator (1) - Hash (2)
- IPAddr (2)
-
IRB
:: Context (7) -
IRB
:: Inspector (4) - Integer (2)
- MatchData (1)
- Matrix (1)
- Method (6)
- Module (18)
-
Net
:: SMTP (1) - Object (7)
-
OpenSSL
:: HMAC (1) - OpenStruct (3)
-
OptionParser
:: ParseError (1) - Proc (2)
-
Process
:: Status (1) -
RDoc
:: Context :: Section (1) -
RDoc
:: Markup (1) -
RDoc
:: Options (1) -
REXML
:: CData (1) -
REXML
:: Text (1) -
Rake
:: FileList (2) -
Rake
:: GemPackageTask (4) -
Rake
:: Task (1) -
Rake
:: TaskArguments (2) - Range (4)
- Rational (1)
- Regexp (2)
-
RubyVM
:: AbstractSyntaxTree :: Node (1) -
RubyVM
:: InstructionSequence (1) - Set (2)
- Socket (3)
-
Socket
:: AncillaryData (2) -
Socket
:: Ifaddr (1) - String (2)
- StringScanner (1)
- Struct (6)
- Symbol (2)
- Thread (2)
-
Thread
:: Backtrace :: Location (1) - Time (1)
- TracePoint (1)
- TrueClass (1)
- UnboundMethod (2)
- Vector (1)
-
WIN32OLE
_ TYPE (1) -
Win32
:: Registry (1) -
Zlib
:: GzipFile :: Error (1)
モジュール
- Find (2)
-
Gem
:: RequirePathsBuilder (1) - IRB (1)
- JSON (2)
- Kernel (29)
- ObjectSpace (2)
-
OpenSSL
:: OCSP (1) - Signal (2)
-
Socket
:: Constants (3) - URI (2)
-
WEBrick
:: HTTPUtils (1)
オブジェクト
- ENV (1)
-
IRB
:: MagicFile (1) - main (2)
キーワード
-
$ -0 (1) -
$ -F (1) -
$ -I (1) -
$ -K (1) -
$ -W (1) -
$ -a (1) -
$ -d (1) -
$ -i (1) -
$ -l (1) -
$ -p (1) -
$ -v (1) -
$ -w (1) -
$ / (1) -
$ : (1) -
$ ; (1) -
$ > (1) -
$ DEBUG (1) -
$ KCODE (1) -
$ LOAD _ PATH (1) -
$ VERBOSE (1) -
$ stdout (1) - === (4)
-
AF
_ UNSPEC (2) - ARGF (1)
- Alias (1)
-
CURRENT
_ SPECIFICATION _ VERSION (1) - DATA (1)
-
ENCODING
_ SPEC _ RE (1) - Encoding (1)
- GemPackageTask (1)
- Hash (1)
-
INADDR
_ UNSPEC _ GROUP (2) - INSPECTORS (1)
-
ISO
_ 2022 _ JP _ KDDI (1) - InspectKey (1)
- Inspector (2)
- InvalidSpecificationException (1)
-
MARSHAL
_ FIELDS (1) - Mapping (1)
- MonitorMixin (1)
-
NONEXISTENT
_ SPECIFICATION _ VERSION (1) -
NO
_ INSPECTING _ IVARS (1) -
PF
_ UNSPEC (2) - Proc (1)
-
REVOKED
_ STATUS _ UNSPECIFIED (1) - Range (1)
- Regexp (1)
- Ruby プログラムの実行 (1)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (1)
- Rubyの起動 (1)
- Ruby用語集 (1)
-
SJIS
_ KDDI (1) - SPECIAL (1)
-
SPECIAL
_ CONST _ P (1) -
SPECIAL
_ RETURN (1) -
SPECIFICATION
_ VERSION _ HISTORY (1) -
STATELESS
_ ISO _ 2022 _ JP _ KDDI (1) - Scalar (1)
- SecurityError (1)
- Sequence (1)
- SpecFetcher (1)
- Specification (1)
- SpecificationCommand (1)
-
Stateless
_ ISO _ 2022 _ JP _ KDDI (1) - String (1)
- TODAY (1)
- Thread (1)
-
UTF8
_ KDDI (1) - [] (1)
-
_ _ inspect _ _ (1) -
_ dump (1) -
_ load (1) - ` (1)
- abbreviate (1)
-
accept
_ charset= (1) - add (1)
-
add
_ bindir (1) -
add
_ dependency (1) -
add
_ development _ dependency (1) -
add
_ runtime _ dependency (1) -
add
_ spec (1) -
add
_ special (1) -
add
_ specific _ extra _ args (1) -
add
_ specs (1) -
alias
_ method (1) -
array
_ attribute (1) -
array
_ attributes (1) -
ask
_ if _ ok (1) -
assign
_ defaults (1) -
at
_ exit (1) - attribute (1)
-
attribute
_ alias _ singular (1) -
attribute
_ defaults (1) -
attribute
_ names (1) - attributes (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)
-
decode
_ www _ form (1) - deconstruct (1)
-
deconstruct
_ keys (1) -
def
_ inspector (1) -
default
_ executable (1) -
default
_ executable= (1) -
default
_ external (1) -
default
_ external= (1) -
default
_ internal (1) -
default
_ internal= (1) -
default
_ value (1) -
define
_ finalizer (2) - 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)
-
encode
_ www _ form (1) - encoding (1)
-
ensure
_ dependency (1) - executable (1)
- executable= (1)
- executables (1)
- executables= (1)
- exit (1)
- extensions (1)
- extensions= (1)
-
extra
_ rdoc _ files (1) -
extra
_ rdoc _ files= (1) - fetch (1)
-
fetch
_ spec (1) - fetcher (1)
- fetcher= (1)
-
file
_ name (1) - files (1)
- files= (1)
- find (3)
-
find
_ all (1) -
find
_ matching (1) -
find
_ name (2) -
find
_ reverse _ dependencies (1) -
find
_ spec _ by _ name _ and _ version (1) -
from
_ gems _ in (1) -
from
_ yaml (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 (56)
- inspect? (1)
-
inspect
_ i (1) -
inspect
_ mode (1) -
inspect
_ mode= (1) -
inspect
_ obj (1) -
inspect
_ sockaddr (1) -
inspect
_ value (1) - install (1)
-
installation
_ path (1) -
installed
_ spec _ directories (1) -
instance
_ eval (2) -
ip
_ pktinfo (2) -
ipv6
_ unspecified? (1) -
irb
/ inspector (1) -
keys
_ with _ inspector (1) - lambda (1)
-
latest
_ specs (3) -
legacy
_ repos (1) -
lib
_ dirs _ for (1) -
lib
_ files (1) - list (2)
- load (1)
-
load
_ file (1) -
load
_ file! (1) -
load
_ gems _ in (1) -
load
_ gemspec (1) -
load
_ gemspecs (1) -
load
_ specification (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)
-
method
_ inspect (1) -
minitest
/ spec (1) - name (2)
- name= (1)
- new (8)
- normalize (1)
-
normalize
_ yaml _ input (1) -
original
_ name (1) -
original
_ platform (1) -
original
_ platform= (1) -
overwrite
_ accessor (1) -
parse
_ range _ header (1) -
path
_ ok? (1) - pathmap (2)
- platform (1)
- platform= (1)
-
pretty
_ inspect (1) -
pretty
_ print _ inspect (1) -
print
_ dependencies (1) - private (4)
- proc (1)
- protected (4)
- public (4)
-
rake
/ gempackagetask (1) -
rb
_ inspect (1) -
rb
_ obj _ inspect (1) -
rb
_ thread _ inspect (1) -
rb
_ time _ timespec _ new (1) -
rb
_ timespec _ now (1) -
read
_ only (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
_ attribute (1) -
required
_ attribute? (1) -
required
_ attributes (1) -
required
_ ruby _ version (1) -
required
_ ruby _ version= (1) -
required
_ rubygems _ version (1) -
required
_ rubygems _ version= (1) - requirements (1)
- requirements= (1)
- rss (1)
-
ruby 1
. 8 . 4 feature (1) - rubygems (1)
-
rubygems
/ commands / contents _ command (1) -
rubygems
/ commands / specification _ command (1) -
rubygems
/ spec _ fetcher (1) -
rubygems
/ specification (1) -
rubygems
_ version (1) -
rubygems
_ version= (1) -
runtime
_ dependencies (1) - sanitize (1)
-
satisfies
_ requirement? (1) - search (3)
- send (2)
-
signing
_ key (1) -
signing
_ key= (1) -
singleton
_ method _ undefined (1) -
source
_ location (1) - spec (4)
- spec= (2)
-
spec
_ dirs (1) -
spec
_ dirs= (1) -
spec
_ path (1) -
spec
_ predecessors (1) -
special
_ local _ set (1) - specific? (1)
-
specific
_ eval (1) -
specific
_ extra _ args (1) -
specific
_ extra _ args _ hash (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
_ a (1) -
to
_ proc (1) -
to
_ ruby (1) -
to
_ s (17) -
trace
_ var (3) - trap (2)
-
uninstall
_ gem (1) -
unit
_ test (1) - validate (1)
- values (1)
- version (1)
- version= (1)
-
warn
_ legacy (1) -
write
_ require _ paths _ file _ if _ needed (1) -
write
_ spec (1) - yaml (1)
-
yaml
_ initialize (1) - はじめに (1)
- オブジェクト (1)
- オブジェクト指向スクリプト言語 Ruby リファレンスマニュアル (1)
- クラス (1)
- クラス/メソッドの定義 (1)
- コマンド (1)
- スレッド (1)
- セキュリティモデル (1)
- パターンマッチ (1)
- プログラム・文・式 (1)
- メソッド呼び出し(super・ブロック付き・yield) (1)
- リテラル (1)
- 制御構造 (1)
- 変数と定数 (1)
- 多言語化 (1)
- 字句構造 (1)
- 手続きオブジェクトの挙動の詳細 (1)
- 正規表現 (1)
- 演算子式 (1)
- 環境変数 (1)
- 終了処理 (1)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # inspect -> String (18301.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 (18301.0) -
人間の読みやすい形に表現した文字列を返します。
人間の読みやすい形に表現した文字列を返します。
//emlist[][ruby]{
require 'set'
puts Set.new(['element1', 'element2']).inspect
# => #<Set: {"element1", "element2"}>
//} -
Socket
:: AF _ UNSPEC -> Integer (18301.0) -
アドレスファミリー不定。
アドレスファミリー不定。
@see Socket.open, sys/socket.h(header) -
Socket
:: Constants :: AF _ UNSPEC -> Integer (18301.0) -
アドレスファミリー不定。
アドレスファミリー不定。
@see Socket.open, sys/socket.h(header) -
Socket
:: Constants :: INADDR _ UNSPEC _ GROUP -> Integer (18301.0) -
The reserved multicast group。 IPv4の 244.0.0.0 に対応する整数です。
The reserved multicast group。
IPv4の 244.0.0.0 に対応する整数です。
@see http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml, 5771 -
Socket
:: Constants :: PF _ UNSPEC -> Integer (18301.0) -
プロトコルファミリー不定。
プロトコルファミリー不定。
@see Socket::Constants::AF_UNSPEC, Socket.open -
Socket
:: INADDR _ UNSPEC _ GROUP -> Integer (18301.0) -
The reserved multicast group。 IPv4の 244.0.0.0 に対応する整数です。
The reserved multicast group。
IPv4の 244.0.0.0 に対応する整数です。
@see http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xml, 5771 -
Socket
:: Ifaddr # inspect -> String (18301.0) -
self の情報を人間に読みやすい文字列にして返します。
self の情報を人間に読みやすい文字列にして返します。 -
Socket
:: PF _ UNSPEC -> Integer (18301.0) -
プロトコルファミリー不定。
プロトコルファミリー不定。
@see Socket::Constants::AF_UNSPEC, Socket.open -
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" -
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
_ inspect(VALUE obj) (18301.0) -
obj.inspect の実体。
obj.inspect の実体。 -
Vector
# inspect -> String (18301.0) -
オブジェクトの内容を文字列化します。
オブジェクトの内容を文字列化します。 -
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 SPECIAL
_ CONST _ P(VALUE obj) (18301.0) -
obj が実体の構造体を持たないとき真。 現時点で真になるのは Qnil, Qtrue, Qfalse と、 Fixnum, Symbol のインスタンス。
obj が実体の構造体を持たないとき真。
現時点で真になるのは Qnil, Qtrue, Qfalse と、
Fixnum, Symbol のインスタンス。 -
main
. inspect -> "main" (18301.0) -
"main" を返します。
"main" を返します。 -
static VALUE inspect
_ obj(VALUE obj , VALUE str) (18301.0) -
-
static VALUE method
_ inspect(VALUE method) (18301.0) -
-
static VALUE rb
_ obj _ inspect(VALUE obj) (18301.0) -
Object#inspect の実体です。
Object#inspect の実体です。 -
static VALUE rb
_ thread _ inspect(VALUE thread) (18301.0) -
-
static VALUE specific
_ eval(int argc , VALUE *argv , VALUE klass , VALUE self) (18301.0) -
rb_obj_instance_eval と rb_mod_module_eval を共通化するための補助関数です。
rb_obj_instance_eval と rb_mod_module_eval を共通化するための補助関数です。 -
static int inspect
_ i(ID id , VALUE value , VALUE str) (18301.0) -
-
static void special
_ local _ set(char c , VALUE val) (18301.0) -
$~ と $_ をセットします。 現在は c=0 が $_ で c=1 が $~ です。
$~ と $_ をセットします。
現在は c=0 が $_ で c=1 が $~ です。 -
rubygems
/ specification (18019.0) -
Gem パッケージのメタデータを扱うためのライブラリです。
Gem パッケージのメタデータを扱うためのライブラリです。
通常 gemspec ファイルや Rakefile でメタデータを定義します。
例:
spec = Gem::Specification.new do |s|
s.name = 'rfoo'
s.version = '1.0'
s.summary = 'Example gem specification'
...
end -
Gem
:: Commands :: SpecificationCommand (18001.0) -
指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのクラスです。
指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのクラスです。 -
Gem
:: InvalidSpecificationException (18001.0) -
不正な gemspec に関する例外です。
不正な gemspec に関する例外です。 -
Gem
:: SpecFetcher (18001.0) -
リモートリポジトリから Gem のメタデータを取得して更新するためのクラスです。
リモートリポジトリから Gem のメタデータを取得して更新するためのクラスです。 -
Gem
:: Specification (18001.0) -
Gem パッケージのメタデータを扱うためのクラスです。
Gem パッケージのメタデータを扱うためのクラスです。 -
IRB
:: Inspector (18001.0) -
実行結果の出力を行うためのクラスです。
実行結果の出力を行うためのクラスです。 -
irb
/ inspector (18001.0) -
irb コマンドで実行結果の出力方式(inspect_mode)を定義するためのサブライ ブラリです。
irb コマンドで実行結果の出力方式(inspect_mode)を定義するためのサブライ
ブラリです。 -
minitest
/ spec (18001.0) -
BDD 風にテストを書くためのクラスやメソッドを定義するためのライブラリです。
BDD 風にテストを書くためのクラスやメソッドを定義するためのライブラリです。
このライブラリはbundled gem(gemファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。
* rubygems.org: https://rubygems.org/gems/minitest
* プロジェクトページ: https://github.com/seattlerb/minitest
* リファレンス: https://www.rubydoc.info/gems/minitest -
rubygems
/ commands / specification _ command (18001.0) -
指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのライブラリです。
指定された Gem パッケージの gemspec の情報を YAML 形式で表示するためのライブラリです。
Usage: gem specification [GEMFILE] [options]
Options:
-v, --version VERSION Specify version of gem to examine
--platform PLATFORM Specify the platform of gem to specification
--all ... -
rubygems
/ spec _ fetcher (18001.0) -
リモートリポジトリから Gem のメタデータを取得して更新するためのライブラリです。
リモートリポジトリから Gem のメタデータを取得して更新するためのライブラリです。 -
Gem
:: SpecFetcher . fetcher -> Gem :: SpecFetcher (9301.0) -
このクラスの唯一のインスタンスを返します。
このクラスの唯一のインスタンスを返します。 -
Gem
:: Specification . _ load(str) -> Gem :: Specification (9301.0) -
マーシャルされたデータをロードするためのメソッドです。
マーシャルされたデータをロードするためのメソッドです。
@param str マーシャルされたデータを指定します。 -
Gem
:: Specification . from _ yaml(input) -> Gem :: Specification (9301.0) -
YAML ファイルから gemspec をロードします。
YAML ファイルから gemspec をロードします。
YAML ファイルから Gem::Specification をロードすると、通常の Ruby オブジェクトの
初期化ルーチン (#initialize) を通りません。このメソッドは初期化ルーチンの一部を実行し、
gemspec のバージョンチェックも行います。
@param input 文字列か IO オブジェクトを指定します。 -
Gem
:: Specification . load(filename) -> Gem :: Specification (9301.0) -
gemspec ファイルをロードします。
gemspec ファイルをロードします。
@param filename gemspec のファイル名を指定します。
@raise StandardError gemspec ファイル内でこのメソッドを呼んでいる場合に発生します。 -
OpenSSL
:: HMAC # inspect -> String (9301.0) -
オブジェクトの内部状態から算出された HMAC を 16進の文字列で返します。
オブジェクトの内部状態から算出された HMAC を
16進の文字列で返します。 -
クラス/メソッドの定義 (9163.0)
-
クラス/メソッドの定義 * クラス/メソッドの定義: * class * singleton_class * module * method * operator * nest_method * eval_method * singleton_method * class_method * limit * 定義に関する操作: * alias * undef * defined
クラス/メソッドの定義
* クラス/メソッドの定義:
* class
* singleton_class
* module
* method
* operator
* nest_method
* eval_method
* singleton_method
* class_method
* limit
* 定義に関する操作:
* alias
* undef
* defined
===[a:class] クラス定義
//emlist[例][ruby]{
class Foo < S... -
メソッド呼び出し(super・ブロック付き・yield) (9127.0)
-
メソッド呼び出し(super・ブロック付き・yield) * super * block * yield * block_arg * numbered_parameters * it * call_method
メソッド呼び出し(super・ブロック付き・yield)
* super
* block
* yield
* block_arg
* numbered_parameters
* it
* call_method
//emlist[例][ruby]{
foo.bar()
foo.bar
bar()
print "hello world\n"
print
Class.new
Class::new
//}
文法:
[式 `.'] 識別子 [`(' [[`*'] 式] ... [`&' 式] `)']
[式 `::'] 識別... -
プログラム・文・式 (9109.0)
-
プログラム・文・式 * exp * terminate
プログラム・文・式
* exp
* terminate
プログラムはexpを並べたものです。式と式の間はセミコロ
ン(;)または改行で区切ります。ただし、バックスラッシュに続く改行は文
の区切りにならず、次の行へ継続します。
例:
print "hello world!\n"
===[a:exp] 式
例:
true
(1+2)*3
foo()
if test then ok else ng end
Ruby の式には、spec/variables、さまざまなspec/literal... -
制御構造 (9109.0)
-
制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END
制御構造
条件分岐:
* if
* unless
* case
繰り返し:
* while
* until
* for
* break
* next
* redo
* retry
例外処理:
* raise
* begin
その他:
* return
* BEGIN
* END
Rubyでは(Cなどとは異なり)制御構造は式であって、何らかの値を返すものが
あります(返さないものもあります。値を返さない式を代入式の右辺に置くと
syntax error になります)。
R... -
リテラル (9055.0)
-
リテラル * num * string * backslash * exp * char * command * here * regexp * array * hash * range * symbol * percent
リテラル
* num
* string
* backslash
* exp
* char
* command
* here
* regexp
* array
* hash
* range
* symbol
* percent
数字の1や文字列"hello world"のようにRubyのプログラムの中に直接
記述できる値の事をリテラルといいます。
===[a:num] 数値リテラル
: 123
: 0d123
整数
: -123
符号つき整数
: 123.45
浮動小数点数。
.1 など "." で始まる浮動小... -
コマンド (9037.0)
-
コマンド Ruby では以下のコマンドが提供されます。
コマンド
Ruby では以下のコマンドが提供されます。
: erb
埋め込みRuby処理ツール。erb を参照。
: gem
Rubyのパッケージ管理ツール。lib:rubygems#gem_command を参照。
: irb
Ruby の対話インタフェース。irb を参照。
: rake
Ruby の内部 DSL で記述するビルドツール。rake を参照。
: rdoc
Ruby のソースファイルからドキュメントを生成するツール。rdoc を参照。
: ri
RDoc で書かれた Ruby のドキュメントをコマンドラインから閲覧するツール。
: ruby
R... -
スレッド (9037.0)
-
スレッド スレッドとはメモリ空間を共有して同時に実行される制御の流れです。 Ruby ではスレッドはThread クラスのインスタンスとして表されます。
スレッド
スレッドとはメモリ空間を共有して同時に実行される制御の流れです。
Ruby ではスレッドはThread クラスのインスタンスとして表されます。
=== 実装
ネイティブスレッドを用いて実装されていますが、
現在の実装では Ruby VM は Giant VM lock (GVL) を有しており、同時に実行される
ネイティブスレッドは常にひとつです。
ただし、IO 関連のブロックする可能性があるシステムコールを行う場合には
GVL を解放します。その場合にはスレッドは同時に実行され得ます。
また拡張ライブラリから GVL を操作できるので、複数のスレッドを
同時に実行するような拡... -
正規表現 (9037.0)
-
正規表現 * metachar * expansion * char * anychar * string * str * quantifier * capture * grouping * subexp * selector * anchor * cond * option * encoding * comment * free_format_mode * absenceop * list * specialvar * references
正規表現
* metachar
* expansion
* char
* anychar
* string
* str
* quantifier
* capture
* grouping
* subexp
* selector
* anchor
* cond
* option
* encoding
* comment
* free_format_mode
* absenceop
* list
* specialvar
* references
正規表現(regular expression)は文字列のパタ... -
Ruby プログラムの実行 (9019.0)
-
Ruby プログラムの実行 === Ruby プログラム
Ruby プログラムの実行
=== Ruby プログラム
Ruby プログラムの実行は文の連なりの評価です。なんらかの形であたえられたプログラムテキストをコンパイルし、BEGIN 文があればそれを評価し、トップレベルの式の連なりを評価し、END ブロックがあれば最後にそれを評価して終了します (終了処理の詳細については spec/terminate を参照のこと)。
=== 文
==== if
if 文は、まず条件式を評価し、その値が真ならば対応する本体を評価します。
偽ならば elsif 節の条件式を順番に評価し、その値が始めて真になった節の
本体を評価します。それらがすべて偽なら... -
手続きオブジェクトの挙動の詳細 (9019.0)
-
手続きオブジェクトの挙動の詳細 * def * should_use_next * block * lambda_proc * orphan
手続きオブジェクトの挙動の詳細
* def
* should_use_next
* block
* lambda_proc
* orphan
===[a:def] 手続きオブジェクトとは
手続きオブジェクトとはブロックをコンテキスト(ローカル変数のスコープやスタックフレーム)と
ともにオブジェクトにしたものです。Proc クラスのインスタンスとして実現されています。
ブロック内では、新たなスコープが導入されるとともに、外側のローカル変数を参照できます。
Proc オブジェクトがローカル変数のスコープを保持していることは以下の例で変数 var を
参照できていることからわかりま... -
演算子式 (9019.0)
-
演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond
演算子式
* assign
* selfassign
* multiassign
* range
* range_cond
* and
* or
* not
* cond
//emlist[例][ruby]{
1+2*3/4
//}
プログラミングの利便のために一部のメソッド呼び出しと制御構造は演算子形
式をとります。Rubyには以下にあげる演算子があります。
高い ::
[]
+(単項) ! ~
**
... -
環境変数 (9019.0)
-
環境変数 Rubyインタプリタは以下の環境変数を参照します。
環境変数
Rubyインタプリタは以下の環境変数を参照します。
: RUBYOPT
Rubyインタプリタにデフォルトで渡すオプションを指定します。
指定できないオプションを指定した場合、例外が発生します。
//emlist{
$ RUBYOPT=-y ruby -e ""
ruby: invalid switch in RUBYOPT: -y (RuntimeError)
//}
sh系
//emlist{
RUBYOPT='-Ke -rkconv'
export RUBYOPT
//}
csh系
//emlist{
setenv RU... -
終了処理 (9019.0)
-
終了処理 Ruby はスクリプトの終端に達した場合や捕捉していない例外が発生した場 合に終了します(関数 Kernel.#exit や Kernel.#abort 、メインスレッドに対する Thread.kill などは SystemExit 例外を発生させます)。終了時には以下 の処理が順に実行されます。
終了処理
Ruby はスクリプトの終端に達した場合や捕捉していない例外が発生した場
合に終了します(関数 Kernel.#exit や Kernel.#abort
、メインスレッドに対する Thread.kill などは
SystemExit 例外を発生させます)。終了時には以下
の処理が順に実行されます。
(1) すべてのスレッドを Thread.kill する。
(1) Ruby の擬似シグナル SIGEXIT のハンドラが登録されていればそれを実
行する(Kernel.#trap を参照)。
(1) d:spec/control#END ブロック(END { ... -
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]"
//} -
FalseClass
# to _ s -> String (9001.0) -
常に文字列 "false" を返します。
常に文字列 "false" を返します。
//emlist[例][ruby]{
false.to_s # => "false"
//} -
Float
# to _ s -> String (9001.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
:: SpecFetcher # cache _ dir(uri) -> String (9001.0) -
uri の内容を書き込むローカルのディレクトリ名を返します。
uri の内容を書き込むローカルのディレクトリ名を返します。
@param uri -
Gem
:: SpecFetcher # dir -> String (9001.0) -
このクラスが使用するキャッシュ用ディレクトリの名前を返します。
このクラスが使用するキャッシュ用ディレクトリの名前を返します。 -
Gem
:: SpecFetcher # fetch(dependency , all = false , matching _ platform = true) -> Array (9001.0) -
依存関係を満たす gemspec の配列を返します。
依存関係を満たす gemspec の配列を返します。
@param dependency 依存関係を指定します。
@param all 真を指定するとマッチする全てのバージョンの情報を返します。
@param matching_platform 偽を指定すると全てのプラットフォームの情報を返します。
@see Gem::Dependency -
Gem
:: SpecFetcher # find _ matching(dependency , all = false , matching _ platform = true) -> Array (9001.0) -
依存関係を満たす gemspec の名前の配列を返します。
依存関係を満たす gemspec の名前の配列を返します。
@param dependency 依存関係を指定します。
@param all 真を指定するとマッチする全てのバージョンの情報を返します。
@param matching_platform 偽を指定すると全てのプラットフォームの情報を返します。
@see Gem::Dependency -
Gem
:: SpecFetcher # legacy _ repos -> Array (9001.0) -
RubyGems 1.2 未満で作成されたリポジトリの配列を返します。
RubyGems 1.2 未満で作成されたリポジトリの配列を返します。 -
Gem
:: SpecFetcher # list(all = false) -> Array (9001.0) -
Gem::sources に格納されている各ソースから利用可能な Gem のリストを取得して返します。
Gem::sources に格納されている各ソースから利用可能な Gem のリストを取得して返します。
@param list 真を指定すると全てのバージョンの情報を返します。 -
Gem
:: SpecFetcher # warn _ legacy(exception) { . . . } -> bool (9001.0) -
Gem::SpecFetcher#fetch で例外が発生した場合に呼び出されます。
Gem::SpecFetcher#fetch で例外が発生した場合に呼び出されます。
RubyGems 1.2 未満で作成したリポジトリにアクセスした事が原因で例外が発生した場合には
警告が表示されます。またこの場合、ブロックを与えていればブロックは評価されます。
それ以外の原因で例外が発生した場合は偽を返します。
@param exception 例外オブジェクトを指定します。
@see Gem::SpecFetcher#fetch -
Gem
:: SpecFetcher . fetcher=(fetcher) (9001.0) -
@todo
@todo -
Gem
:: Specification # _ dump -> String (9001.0) -
重要なインスタンス変数のみを Marshal.#dump します。
重要なインスタンス変数のみを Marshal.#dump します。
@see Marshal.#dump -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (9001.0) -
実行コマンドの格納場所を返します。
実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。 -
Gem
:: Specification # add _ dependency(gem , *requirements) -> [Gem :: Dependency] (9001.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0... -
Gem
:: Specification # add _ development _ dependency(gem , *requirements) -> [Gem :: Dependency] (9001.0) -
この gem の DEVELOPMENT 依存性を追加します。 この gem の開発時に必要となる gem を指定します。
この gem の DEVELOPMENT 依存性を追加します。
この gem の開発時に必要となる gem を指定します。
//emlist[][ruby]{
gem "rack", "~> 1.6", ">= 1.6.12"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0 個以上指定します。デフォルトは ">= 0" です。
@see Gem::Specification#add_runtime_dependency, Gem::Depende... -
Gem
:: Specification # add _ runtime _ dependency(gem , *requirements) -> [Gem :: Dependency] (9001.0) -
この gem の RUNTIME 依存性を追加します。 実行時に必要となる gem を指定します。
この gem の RUNTIME 依存性を追加します。
実行時に必要となる gem を指定します。
//emlist[][ruby]{
# https://github.com/rurema/bitclust/blob/v1.2.3/bitclust-core.gemspec#L25
s.add_runtime_dependency "progressbar", ">= 1.9.0", "< 2.0"
//}
@param gem 依存する gem の名前か Gem::Dependency のインスタンスを指定します。
@param requirements バージョンの必要条件を 0... -
Gem
:: Specification # assign _ defaults -> () (9001.0) -
全ての属性にデフォルト値をセットします。
全ての属性にデフォルト値をセットします。
これはアクセサメソッドを使用して行われるので、ブロックを用いた特別な初期化も
きちんと実行されます。セットされる値はデフォルト値のコピーです。 -
Gem
:: Specification # author -> String (9001.0) -
作成者の名前を返します。
作成者の名前を返します。 -
Gem
:: Specification # author=(name) (9001.0) -
作成者の名前をセットします。
作成者の名前をセットします。 -
Gem
:: Specification # authors -> Array (9001.0) -
作成者の名前の配列を返します。
作成者の名前の配列を返します。 -
Gem
:: Specification # authors=(names) (9001.0) -
作成者の名前の配列をセットします。
作成者の名前の配列をセットします。 -
Gem
:: Specification # autorequire -> String (9001.0) -
非推奨の属性です。
非推奨の属性です。 -
Gem
:: Specification # autorequire=(lib) (9001.0) -
非推奨の属性です。
非推奨の属性です。 -
Gem
:: Specification # bindir -> String (9001.0) -
実行ファイルを格納するディレクトリを返します。
実行ファイルを格納するディレクトリを返します。 -
Gem
:: Specification # bindir=(dir) (9001.0) -
実行ファイルを格納するディレクトリをセットします。
実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。 -
Gem
:: Specification # cert _ chain -> Array (9001.0) -
@todo
@todo -
Gem
:: Specification # cert _ chain=(arr) (9001.0) -
@todo
@todo
@param arr デフォルトは空の配列です。 -
Gem
:: Specification # date -> Time (9001.0) -
日付を返します。
日付を返します。 -
Gem
:: Specification # date=(date) (9001.0) -
@param date 日付をセットします。デフォルトは今日です。
@param date 日付をセットします。デフォルトは今日です。 -
Gem
:: Specification # default _ executable -> String | nil (9001.0) -
Gem パッケージ内で gem コマンド経由で実行するファイルを返します。
Gem パッケージ内で gem コマンド経由で実行するファイルを返します。 -
Gem
:: Specification # default _ executable=(executable) (9001.0) -
Gem パッケージ内で gem コマンド経由で実行するファイルをセットします。
Gem パッケージ内で gem コマンド経由で実行するファイルをセットします。
@param executable 実行ファイルを指定します。 -
Gem
:: Specification # dependencies -> Array (9001.0) -
依存している Gem のリストを返します。
依存している Gem のリストを返します。
@see Gem::Dependency -
Gem
:: Specification # dependent _ gems -> Array (9001.0) -
この Gem に依存している全ての Gem の情報のリストを返します。
この Gem に依存している全ての Gem の情報のリストを返します。
それぞれのエントリは配列になっており、各要素は以下のようになっています。
(0) Gem::Specification
(1) Gem::Dependency
(2) Gem::Specification の配列 -
Gem
:: Specification # description -> String (9001.0) -
Gem パッケージの説明を返します。
Gem パッケージの説明を返します。 -
Gem
:: Specification # description=(desc) (9001.0) -
Gem パッケージの説明をセットします。
Gem パッケージの説明をセットします。
@param desc パッケージの詳細を説明する文章を指定します。 -
Gem
:: Specification # development _ dependencies -> Array (9001.0) -
この Gem が依存している Gem のリストを返します。
この Gem が依存している Gem のリストを返します。 -
Gem
:: Specification # email -> String (9001.0) -
メールアドレスを返します。
メールアドレスを返します。 -
Gem
:: Specification # email=(email) (9001.0) -
メールアドレスをセットします。
メールアドレスをセットします。
@param email メールアドレスを指定します。