4件ヒット
[1-4件を表示]
(0.163秒)
クラス
- File (1)
- Method (1)
- UnboundMethod (1)
検索結果
先頭4件
-
UnboundMethod
# owner -> Class | Module (54679.0) -
このメソッドが定義されている class か module を返します。
このメソッドが定義されている class か module を返します。
//emlist[例][ruby]{
Integer.instance_method(:to_s).owner # => Integer
Integer.instance_method(:to_c).owner # => Numeric
Integer.instance_method(:hash).owner # => Kernel
//} -
Method
# owner -> Class | Module (54661.0) -
このメソッドが定義されている class か module を返します。
このメソッドが定義されている class か module を返します。
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.owner # => Foo
m = Foo.new.method(:puts) # => #<Method: Foo(Kernel)#puts>
m.owner # => Kernel
//} -
File
# chown(owner , group) -> 0 (9343.0) -
ファイルのオーナーとグループを変更します。
ファイルのオーナーとグループを変更します。
適切な権限があればファイルのオーナーとグループを変更できます。
所有者の変更に成功した場合は 0 を返します。変更に失敗した場合は
例外 Errno::EXXX が発生します。
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定することで、グループを現在のままにすることができます。
@raise IOError 自身が close されている... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (340.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby...