174件ヒット
[1-100件を表示]
(0.033秒)
別のキーワード
ライブラリ
- ビルトイン (12)
- erb (12)
- forwardable (24)
-
irb
/ cmd / help (12) -
irb
/ extend-command (24) - json (36)
- profiler (6)
クラス
-
IRB
:: ExtendCommand :: Help (12) - Object (12)
モジュール
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
Profiler
_ _ (6) -
def
_ delegator (12) -
def
_ erb _ method (12) -
def
_ instance _ delegator (12) - execute (12)
-
install
_ alias _ method (12) -
irb
/ completion (12) -
irb
_ original _ method _ name (12) -
json
_ create (12) -
ruby 1
. 6 feature (12) -
singleton
_ methods (12) - クラス/メソッドの定義 (12)
検索結果
先頭5件
- JSON
:: Ext :: Generator :: GeneratorMethods :: String :: Extend - JSON
:: Generator :: GeneratorMethods :: String :: Extend - ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil - IRB
:: ExtendCommandBundle . irb _ original _ method _ name(method _ name) -> String - IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE)
-
JSON
:: Ext :: Generator :: GeneratorMethods :: String :: Extend (24016.0) -
Alias of JSON::Generator::GeneratorMethods::String::Extend
...Alias of JSON::Generator::GeneratorMethods::String::Extend... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (24000.0) -
String に JSON で使用する特異メソッドを追加するためのモジュールです。
String に JSON で使用する特異メソッドを追加するためのモジュールです。 -
ERB
:: DefMethod . # def _ erb _ method(methodname , erb) -> nil (18420.0) -
self に erb のスクリプトをメソッドとして定義します。
...をメソッドとして定義します。
メソッド名は methodname で指定します。
erb が文字列の時、そのファイルを読み込み ERB で変換したのち、メソッドとして定義します。
@param methodname メソッド名
@param erb ERBインスタンスもしく......はERBソースファイル名
例:
require 'erb'
class Writer
extend ERB::DefMethod
def_erb_method('to_html', 'writer.erb')
...
end
...
puts writer.to_html... -
IRB
:: ExtendCommandBundle . irb _ original _ method _ name(method _ name) -> String (15460.0) -
method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ ラリ内部で使用します。
...
method_name で指定したメソッドの irb 中でのエイリアスを返します。ライブ
ラリ内部で使用します。
@param method_name メソッド名を Symbol か文字列で指定します。
@see IRB::ExtendCommandBundle#install_alias_method... -
IRB
:: ExtendCommandBundle # install _ alias _ method(to , from , override = NO _ OVERRIDE) (15202.0) -
メソッドのエイリアスを定義します。ライブラリ内部で使用します。
...のメソッドを
上書きするかどうかを
IRB::ExtendCommandBundle::NO_OVERRIDE、
IRB::ExtendCommandBundle::OVERRIDE_PRIVATE_ONLY、
IRB::ExtendCommandBundle::OVERRIDE_ALL のいずれか
で指定します。... -
Object
# singleton _ methods(inherited _ too = true) -> [Symbol] (12212.0) -
そのオブジェクトに対して定義されている特異メソッド名 (public あるいは protected メソッド) の一覧を返します。
...異メソッドとは Object#extend によって追加された特異メソッドや、
self がクラスの場合はスーパークラスのクラスメソッド(Classのインスタンスの特異メソッド)などです。
singleton_methods(false) は、Object#methods(false) と同じです。......c; def public_self() end
end
# あるオブジェクトの特異メソッドの一覧を得る。
p obj.singleton_methods(false)
p obj.methods(false)
p Foo.singleton_methods(false)
#実行結果
[:protected_self, :public_self]
[:protected_self, :public_self]
[:protected_class_foo, :public_c......p obj.singleton_methods(true)
p Foo.singleton_methods(true) - Object.singleton_methods(true)
#実行結果
[:protected_self, :public_self, :protected_bar, :public_bar]
[:protected_class_foo, :public_class_foo, :protected_class_parent, :public_class_parent]
//}
@see Object#methods,Object#extend... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend . json _ create(hash) -> String (9000.0) -
JSON のオブジェクトから Ruby の文字列を生成して返します。
JSON のオブジェクトから Ruby の文字列を生成して返します。
@param hash キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
require 'json'
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "ABC" -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (3012.0) -
RI から Ruby のドキュメントを参照します。
...ができます。また、空行を入力する事で irb のプロンプトに戻る事ができま
す。
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)... -
Forwardable
# def _ delegator(accessor , method , ali = method) -> () (438.0) -
メソッドの委譲先を設定します。
...。
@param accessor 委譲先のオブジェクト
@param method 委譲先のメソッド
@param ali 委譲元のメソッド
委譲元のオブジェクトで ali が呼び出された場合に、
委譲先のオブジェクトの method へ処理が委譲されるようになります。
委......require 'forwardable'
class MyQueue
extend Forwardable
attr_reader :queue
def initialize
@queue = []
end
def_delegator :@queue, :push, :mypush
end
q = MyQueue.new
q.mypush 42
q.queue # => [42]
q.push 23 # => NoMethodError
@see Forwardable#def_delegators...