種類
ライブラリ
- ビルトイン (516)
- csv (22)
- digest (11)
- forwardable (55)
- json (11)
-
minitest
/ spec (1) -
minitest
/ unit (2) - openssl (11)
- pp (11)
- prime (77)
-
rdoc
/ context (11) -
rubygems
/ command _ manager (11) - singleton (22)
- syslog (11)
-
webrick
/ httpservlet / abstract (11) -
webrick
/ httpservlet / prochandler (11) - zlib (11)
クラス
- BasicObject (44)
- CSV (22)
-
Gem
:: CommandManager (11) -
JSON
:: Parser (11) - Module (143)
- Object (199)
- Prime (66)
-
RDoc
:: Context (11) - UnboundMethod (76)
-
WEBrick
:: HTTPServlet :: AbstractServlet (11) -
WEBrick
:: HTTPServlet :: ProcHandler (11)
モジュール
- Enumerable (11)
- Forwardable (44)
- Kernel (33)
-
MiniTest
:: Assertions (2) - Singleton (11)
- Syslog (11)
オブジェクト
- main (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - === (11)
- Digest (11)
- Instance (11)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Prime (11)
- Ruby用語集 (11)
- SingleForwardable (11)
- Singleton (11)
- TYPES (11)
- ZStream (11)
- arity (11)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) - bind (11)
-
bind
_ call (10) -
class
_ eval (11) -
class
_ variables (11) - constants (11)
-
def
_ delegator (11) -
def
_ instance _ delegator (11) -
def
_ instance _ delegators (11) -
define
_ method (44) - each (22)
- eval (11)
-
get
_ instance (22) -
global
_ variables (11) - grep (11)
-
initialize
_ copy (11) -
ins
_ methods _ i (11) -
ins
_ methods _ priv _ i (11) -
ins
_ methods _ prot _ i (11) - inspect (11)
-
instance
_ delegate (11) -
instance
_ eval (22) -
instance
_ exec (11) -
instance
_ method (11) -
instance
_ methods (11) -
instance
_ of? (11) -
instance
_ variable _ defined? (11) -
instance
_ variable _ get (11) -
instance
_ variable _ set (11) -
instance
_ variables (11) -
int
_ from _ prime _ division (11) - irb (11)
-
irb
/ completion (11) -
is
_ a? (11) -
kind
_ of? (11) -
local
_ variables (11) - methods (11)
-
module
_ eval (11) -
must
_ be _ instance _ of (1) - new (11)
-
original
_ name (11) -
pretty
_ print _ instance _ variables (11) - prime? (11)
-
prime
_ division (11) -
private
_ instance _ methods (11) -
private
_ methods (11) -
protected
_ instance _ methods (11) -
protected
_ methods (11) -
public
_ instance _ method (11) -
public
_ instance _ methods (11) -
public
_ method (11) -
public
_ methods (11) -
rb
_ class _ allocate _ instance (11) -
rb
_ class _ instance _ methods (11) -
rb
_ class _ new _ instance (11) -
rb
_ class _ private _ instance _ methods (11) -
rb
_ class _ protected _ instance _ methods (11) -
rb
_ is _ instance _ id (11) -
rb
_ obj _ instance _ eval (11) -
rb
_ obj _ instance _ variables (11) -
rb
_ obj _ is _ instance _ of (11) -
rb
_ obj _ remove _ instance _ variable (11) -
remove
_ class _ variable (11) -
remove
_ instance _ variable (11) -
respond
_ to? (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
singleton
_ method (11) -
singleton
_ method _ undefined (11) -
source
_ location (11) -
specific
_ eval (11) -
to
_ s (11) - 変数と定数 (11)
検索結果
先頭5件
-
Singleton
. instance -> object (27201.0) -
そのクラスの唯一のインスタンスを返します。 最初に呼ばれたときはそのインスタンスを生成します。
...そのクラスの唯一のインスタンスを返します。
最初に呼ばれたときはそのインスタンスを生成します。
Singleton を include したクラスで定義されますので、
正確には Singleton モジュールのメソッドではありません。... -
static int ins
_ methods _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (通常版)。
...rb_class_instance_methods() のイテレータブロック (通常版)。... -
static int ins
_ methods _ priv _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (private メソッド版)。
...rb_class_instance_methods() のイテレータブロック
(private メソッド版)。... -
static int ins
_ methods _ prot _ i(ID key , NODE *body , VALUE ary) (26116.0) -
rb_class_instance_methods() のイテレータブロック (protected メソッド版)。
...rb_class_instance_methods() のイテレータブロック
(protected メソッド版)。... -
irb (26096.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...irb は Interactive Ruby の略です。
irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
=== irb の使い方
Ruby さえ知っていれば irb を使うのは簡単です。
irb コマンドを実行すると、以下のようなプロン......。
$ irb
irb(main):001:0>
あとは Ruby の式を入力するだけで、その式が実行され、結果が表示されます。
irb(main):001:0> 1+2
3
irb(main):002:0> class Foo
irb(main):003:1> def foo
irb(main):004:2> print 1
irb(main):005:2> end
irb(main):006:1>......jobをスイッチ
nil
irb(main):004:0> jobs # jobのリスト
#0->irb on main (#<Thread:0x400fb7e4> : running)
#1->irb#1 on main (#<Thread:0x40125d64> : stop)
#2->irb#2 on Foo (#<Thread:0x4011d54c> : stop)
nil
irb(main):005:0> Foo.instance_methods # Foo#fo... -
irb
/ completion (26036.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......全に補完します.
irb(main):001:0> in
in inspect instance_eval
include install_alias_method instance_of?
initialize install_aliases instance_variables
irb(main):001:0> inspect
"main"
irb(main):002:0> foo = Objec......覧がでます.
irb(main):003:0> foo.
foo.== foo.frozen? foo.protected_methods
foo.=== foo.hash foo.public_methods
foo.=~ foo.id foo.respond_to?
foo.__id__ foo.inspect f... -
CSV
. instance(data = $ stdout , options = Hash . new) -> CSV (24214.0) -
このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。
...る値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。
ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。
@param data String か IO のインスタンスを......ram options CSV.new のオプションと同じオプションを指定できます。
//emlist[例][ruby]{
require "csv"
options = { headers: true }
text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
csv = CSV.instance(text, options)
cs......v2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read
# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}
@see CSV.new... -
CSV
. instance(data = $ stdout , options = Hash . new) {|csv| . . . } -> object (24214.0) -
このメソッドは CSV.new のように CSV のインスタンスを返します。 しかし、返される値は Object#object_id と与えられたオプションを キーとしてキャッシュされます。
...る値は Object#object_id と与えられたオプションを
キーとしてキャッシュされます。
ブロックが与えられた場合、生成されたインスタンスをブロックに渡して評価した
結果を返します。
@param data String か IO のインスタンスを......ram options CSV.new のオプションと同じオプションを指定できます。
//emlist[例][ruby]{
require "csv"
options = { headers: true }
text =<<-EOS
id,first name,last name,age
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
csv = CSV.instance(text, options)
cs......v2 = CSV.instance(text, options)
csv.object_id == csv2.object_id # => true
print csv.read
# => id,first name,last name,age
# 1,taro,tanaka,20
# 2,jiro,suzuki,18
# 3,ami,sato,19
# 4,yumi,adachi,21
//}
@see CSV.new... -
Gem
:: CommandManager . instance -> Gem :: CommandManager (24201.0) -
自身をインスタンス化します。
自身をインスタンス化します。 -
Prime
. instance -> Prime (24201.0) -
Prime のデフォルトのインスタンスを返します。
...Prime のデフォルトのインスタンスを返します。...