種類
- インスタンスメソッド (409)
- 文書 (91)
- 定数 (39)
- ライブラリ (33)
- 特異メソッド (19)
ライブラリ
- ビルトイン (156)
- coverage (7)
- delegate (33)
- fileutils (11)
- forwardable (44)
- json (132)
-
minitest
/ unit (1) - rake (22)
-
rdoc
/ code _ object (11) -
rdoc
/ context (22) -
rdoc
/ stats (11) -
shell
/ command-processor (6) - win32ole (11)
クラス
- Coverage (7)
- Delegator (33)
-
MiniTest
:: Unit :: TestCase (1) - Module (49)
- Object (77)
- Proc (5)
-
RDoc
:: CodeObject (11) -
RDoc
:: Context (22) -
RDoc
:: Stats (11) -
Rake
:: FileList (22) - Refinement (3)
-
Shell
:: CommandProcessor (6) -
WIN32OLE
_ TYPE (11)
モジュール
- Enumerable (22)
- FileUtils (11)
- Forwardable (22)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11) - SingleForwardable (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
ARRAY
_ METHODS (11) -
DELEGATING
_ METHODS (11) - METHODS (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - NoDelegateMethods (6)
- Ruby用語集 (11)
-
def
_ delegators (22) -
def
_ instance _ delegators (11) -
def
_ single _ delegators (11) -
default
_ event _ sources (11) - grep (22)
-
import
_ methods (3) -
initialize
_ methods _ etc (11) -
instance
_ methods (11) - irb (11)
-
irb
/ completion (11) -
json
_ create (11) -
num
_ methods (11) -
private
_ instance _ methods (11) -
private
_ methods (11) -
protected
_ instance _ methods (11) -
protected
_ methods (22) -
public
_ instance _ methods (11) -
public
_ methods (22) - rdoc (11)
-
remove
_ methods _ etc (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
ruby2
_ keywords (10) - send (22)
-
set
_ visibility _ for (11) -
singleton
_ methods (11) - start (7)
-
test
_ methods (1) -
to
_ json (99) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11)
検索結果
先頭5件
-
Delegator
# methods -> [Symbol] (21207.0) -
そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。
...そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。
このメソッドは public メソッドおよび protected メソッドの名前を返します。
@see Object#methods... -
Object
# methods(include _ inherited = true) -> [Symbol] (18421.0) -
そのオブジェクトに対して呼び出せるメソッド名の一覧を返します。 このメソッドは public メソッドおよび protected メソッドの名前を返します。
...rotected メソッドの名前を返します。
ただし特別に、引数が偽の時は Object#singleton_methods(false) と同じになっています。
@param include_inherited 引数が偽の時は Object#singleton_methods(false) と同じになります。
//emlist[例1][ruby]{
class Par......nt
private; def private_parent() end
protected; def protected_parent() end
public; def public_parent() end
end
class Foo < Parent
private; def private_foo() end
protected; def protected_foo() end
public; def public_foo() end
end
obj = Foo.new
class <<obj
private......めに true を指定して
# いるが、Object のインスタンスメソッドは一覧から排除している。
p obj.methods(true) - Object.instance_methods(true)
p obj.public_methods(true) - Object.public_instance_methods(true)
p obj.private_methods(true) - Object.private_ins... -
Rake
:: FileList :: ARRAY _ METHODS -> Array (15401.0) -
Array に定義されているメソッドのリストです。
...Array に定義されているメソッドのリストです。... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (15218.0) -
生の文字列を格納したハッシュを生成します。
...は UTF-8 の文字列ではなく生の文字列を JSON に変換する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_j......son # source sequence is illegal/malformed (JSON::GeneratorError)... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String (15200.0) -
自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
...自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
@see JSON::Generator::GeneratorMethods::String#to_json_raw_object, JSON::Generator::GeneratorMethods::Hash#to_json... -
Module
# private _ instance _ methods(inherited _ too = true) -> [Symbol] (12425.0) -
そのモジュールで定義されている private メソッド名 の一覧を配列で返します。
...る private メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#private_methods, Module#instance_methods
//emlist[例][ruby]{
module Foo
def foo; end
privat......e def 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]
//}... -
Object
# private _ methods(include _ inherited = true) -> [Symbol] (12419.0) -
そのオブジェクトが理解できる private メソッド名の一覧を返します。
...が理解できる private メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#private_instance_methods,Object#methods,Object#singleton_methods... -
Object
# protected _ methods(include _ inherited = true) -> [Symbol] (12319.0) -
そのオブジェクトが理解できる protected メソッド名の一覧を返します。
...解できる protected メソッド名の一覧を返します。
@param include_inherited 偽となる値を指定すると自身のクラスのスーパークラスで定義されたメソッドを除きます。
@see Module#protected_instance_methods,Object#methods,Object#singleton_methods... -
Refinement
# import _ methods(*modules) -> self (12319.0) -
モジュールからメソッドをインポートします。
...ポートします。
Module#includeと違って、import_methods はメソッドをコピーして
refinement に追加して、refinementでインポートしたメソッドを有効化します。
メソッドをコピーするため、Rubyコードで定義されたメソッドだけしか
イ......][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end
module M
refine String do
import_methods StrUtils
end
end
using M
p "foo".indent(3) # => " foo"
module M
refine String do
import_methods Enumerable
# Can't import method which is not defined with Rub......y code: Enumerable#drop
end
end
//}... -
Module
# protected _ instance _ methods(inherited _ too = true) -> [Symbol] (12313.0) -
そのモジュールで定義されている protected メソッド名 の一覧を配列で返します。
...そのモジュールで定義されている protected メソッド名
の一覧を配列で返します。
@param inherited_too false を指定するとそのモジュールで定義されているメソッドのみ返します。
@see Object#protected_methods, Module#instance_methods...