57件ヒット
[1-57件を表示]
(0.248秒)
ライブラリ
- ビルトイン (22)
- json (11)
-
net
/ ftp (18) -
shell
/ command-processor (6)
クラス
- Method (11)
-
Net
:: FTP (18) -
Shell
:: CommandProcessor (6) - UnboundMethod (11)
モジュール
検索結果
先頭5件
-
UnboundMethod
# owner -> Class | Module (27420.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 (27414.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
//}... -
JSON
:: Generator :: GeneratorMethods :: Object # to _ json(state _ or _ hash = nil) -> String (15207.0) -
自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。
...た結果を JSON 形式の文字列に変換して返します。
このメソッドはあるオブジェクトに to_json メソッドが定義されていない場合に使用する
フォールバックのためのメソッドです。
@param state_or_hash 生成する JSON 形式の文字列......SON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "json"
class Person
attr :name, :age
def initialize(name, age)
@name, @age = name, age
end
end
tanaka = Person.ne......w("tanaka", 29)
tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator::GeneratorMethods::Object
//}... -
Shell
:: CommandProcessor # chown(owner , group , *filename) -> Integer (12308.0) -
File クラスにある同名のクラスメソッドと同じです.
...スメソッドと同じです.
@param owner chown(2) と同様に数値で指定します。nil または -1 を指定することで、オーナーを現在のままにすることができます。
@param group chown(2) と同様に数値で指定します。nil または -1 を指定するこ......とで、グループを現在のままにすることができます。
@param filename ファイル名を表す文字列を指定します。
@see File.chown... -
Net
:: FTP # mlsd(pathname = nil) -> [Net :: FTP :: MLSxEntry] (9313.0) -
pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。
...pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。
ディレクトリの各ファイルの情報が
Net::FTP::MLSxEntry のオブジェクトの配列として得られます。
どのような情報を取り出せるかは Net::FTP::MLSxEnt......ry
を参照してください。
Net::FTP#list は
結果が文字列で得られるため、それを適当に解釈する必要がありますが、
このコマンドの結果は適切に解釈された結果を直接得ることができます。
pathname を省略した場合はカレント......T/MLSD が定義されました。
@param pathname 情報を得るディレクトリ名
@see Net::FTP#mlst
require 'net/ftp'
Net::FTP.open("ftp.example.org") do |ftp|
ftp.login("anonymous", "foobar@example.com")
p ftp.mlsd("/")
# =>
# [#<Net::FTP::MLSxEntry:0x00558fbfa379c0... -
Net
:: FTP # mlsd(pathname = nil) {|entry| . . . } -> () (9313.0) -
pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。
...pathname で指定したディレクトリに含まれているファイルの詳細な情報を得ます。
ディレクトリの各ファイルの情報が
Net::FTP::MLSxEntry のオブジェクトの配列として得られます。
どのような情報を取り出せるかは Net::FTP::MLSxEnt......ry
を参照してください。
Net::FTP#list は
結果が文字列で得られるため、それを適当に解釈する必要がありますが、
このコマンドの結果は適切に解釈された結果を直接得ることができます。
pathname を省略した場合はカレント......T/MLSD が定義されました。
@param pathname 情報を得るディレクトリ名
@see Net::FTP#mlst
require 'net/ftp'
Net::FTP.open("ftp.example.org") do |ftp|
ftp.login("anonymous", "foobar@example.com")
p ftp.mlsd("/")
# =>
# [#<Net::FTP::MLSxEntry:0x00558fbfa379c0...