種類
ライブラリ
- ビルトイン (564)
- csv (24)
- digest (12)
- forwardable (60)
- json (12)
-
minitest
/ spec (1) -
minitest
/ unit (2) - openssl (12)
- pp (12)
- prime (84)
-
rdoc
/ context (12) -
rubygems
/ command _ manager (12) - singleton (24)
- syslog (12)
-
webrick
/ httpservlet / abstract (12) -
webrick
/ httpservlet / prochandler (12) - zlib (12)
クラス
- BasicObject (48)
- CSV (24)
-
Gem
:: CommandManager (12) -
JSON
:: Parser (12) - Module (156)
- Object (217)
- Prime (72)
-
RDoc
:: Context (12) - UnboundMethod (84)
-
WEBrick
:: HTTPServlet :: AbstractServlet (12) -
WEBrick
:: HTTPServlet :: ProcHandler (12)
モジュール
- Enumerable (12)
- Forwardable (48)
- Kernel (36)
-
MiniTest
:: Assertions (2) - Singleton (12)
- Syslog (12)
オブジェクト
- main (24)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (12)
- Digest (12)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 7 . 0 (6) - Prime (12)
- Ruby用語集 (12)
- SingleForwardable (12)
- Singleton (12)
- TYPES (12)
- ZStream (12)
- arity (12)
-
assert
_ instance _ of (1) -
assert
_ kind _ of (1) - bind (12)
-
bind
_ call (12) -
class
_ eval (12) -
class
_ variables (12) - constants (12)
-
def
_ delegator (12) -
def
_ instance _ delegator (12) -
def
_ instance _ delegators (12) -
define
_ method (48) - each (24)
- eval (12)
-
get
_ instance (24) -
global
_ variables (12) - grep (12)
-
initialize
_ copy (12) -
ins
_ methods _ i (12) -
ins
_ methods _ priv _ i (12) -
ins
_ methods _ prot _ i (12) - inspect (12)
- instance (72)
-
instance
_ delegate (12) -
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ method (12) -
instance
_ methods (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
int
_ from _ prime _ division (12) - irb (12)
-
irb
/ completion (12) -
is
_ a? (12) -
kind
_ of? (12) -
local
_ variables (12) - methods (12)
-
module
_ eval (12) -
must
_ be _ instance _ of (1) - new (12)
-
original
_ name (12) -
pretty
_ print _ instance _ variables (12) - prime? (12)
-
prime
_ division (12) -
private
_ instance _ methods (12) -
private
_ methods (12) -
protected
_ instance _ methods (12) -
protected
_ methods (12) -
public
_ instance _ method (12) -
public
_ instance _ methods (12) -
public
_ method (12) -
public
_ methods (12) -
rb
_ class _ allocate _ instance (12) -
rb
_ class _ instance _ methods (12) -
rb
_ class _ new _ instance (12) -
rb
_ class _ private _ instance _ methods (12) -
rb
_ class _ protected _ instance _ methods (12) -
rb
_ is _ instance _ id (12) -
rb
_ obj _ instance _ eval (12) -
rb
_ obj _ instance _ variables (12) -
rb
_ obj _ is _ instance _ of (12) -
rb
_ obj _ remove _ instance _ variable (12) -
remove
_ class _ variable (12) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) -
singleton
_ method (12) -
singleton
_ method _ undefined (12) -
source
_ location (12) -
specific
_ eval (12) -
to
_ s (12) - パターンマッチ (4)
- 変数と定数 (12)
検索結果
先頭5件
-
Module
# private _ instance _ methods(inherited _ too = true) -> [Symbol] (12219.0) -
そのモジュールで定義されている private メソッド名 の一覧を配列で返します。
...private メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#private_methods, Module#instance_methods
//emlist[例][ruby]{
module Foo
def foo; end
private d......ef bar; end
end
module Bar
include Foo
def baz; end
private def qux; end
end
Bar.private_instance_methods # => [:qux, :bar]
Bar.private_instance_methods(false) # => [:qux]
//}... -
Module
# public _ instance _ method(name) -> UnboundMethod (12219.0) -
self の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...の public インスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError 定義されていないメソッド名や、
protected メソッド名、 private メ......として与えると発生します。
//emlist[例][ruby]{
Kernel.public_instance_method(:object_id) #=> #<UnboundMethod: Kernel#object_id>
Kernel.public_instance_method(:p) # method `p' for module `Kernel' is private (NameError)
//}
@see Module#instance_method,Object#public_method... -
Object
# instance _ of?(klass) -> bool (12219.0) -
オブジェクトがクラス klass の直接のインスタンスである時真を返します。
...。
obj.instance_of?(c) が成立する時には、常に obj.kind_of?(c) も成立します。
@param klass Classかそのサブクラスのインスタンスです。
//emlist[][ruby]{
class C < Object
end
class S < C
end
obj = S.new
p obj.instance_of?(S) # true
p obj.instance_of?(C)......# false
//}
@see Object#kind_of?,Object#class... -
Object
# instance _ variables -> [Symbol] (12219.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_variables... -
Object
# remove _ instance _ variable(name) -> object (12219.0) -
オブジェクトからインスタンス変数 name を取り除き、そのインス タンス変数に設定されていた値を返します。
...ます。
@raise NameError オブジェクトがインスタンス変数 name を持たない場合に発生します。
//emlist[][ruby]{
class Foo
def foo
@foo = 1
p remove_instance_variable(:@foo) #=> 1
p remove_instance_variable(:@foo) # instance variable @foo not defined (NameErr......or)
end
end
Foo.new.foo
//}
@see Module#remove_class_variable,Module#remove_const... -
WEBrick
:: HTTPServlet :: AbstractServlet . get _ instance(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (12217.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引数以降に指定された値がそのまま与えられます。... -
VALUE rb
_ class _ private _ instance _ methods(int argc , VALUE *argv , VALUE mod) (12216.0) -
Module#private_instance_methods の実体。 モジュール mod に定義されている private メソッド名の リストを文字列の配列で返します。
...Module#private_instance_methods の実体。
モジュール mod に定義されている private メソッド名の
リストを文字列の配列で返します。... -
CSV
. instance(data = $ stdout , options = Hash . new) -> CSV (12214.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 (12214.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...
