るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.017秒)

別のキーワード

  1. _builtin stat
  2. gc stat
  3. csv stat
  4. pathname stat
  5. stat atime

ライブラリ

クラス

キーワード

検索結果

Net::IMAP::StatusData#attr -> { String => Integer } (21102.0)

STATUS 応答の内容をハッシュで返します。

...STATUS 応答の内容をハッシュで返します。

ハッシュのキーは
"MESSAGES", "RECENT", "UIDNEXT", "UIDVALIDITY", "UNSEEN"
などが使われます。

詳しくは 2060 の 6.3.10、7.2.4 を見てください。...

Net::IMAP#status(mailbox, attr) -> {String => Integer} (6214.0)

STATUS コマンドを送り、mailbox のステータスを得ます。

...STATUS コマンドを送り、mailbox のステータスを得ます。

問い合わせたいステータスは attr に文字列の配列で渡します。

返り値は アトリビュート文字列をキーとするハッシュです。

詳しくは 2060 の 6.3.10 を参考にしてくださ...
...い。

例:
p imap.status("inbox", ["MESSAGES", "RECENT"])
#=> {"RECENT"=>0, "MESSAGES"=>44}

@param mailbox 問い合わせ対象のメールボックス(文字列)
@param attr 問合せたいアトリビュート名(文字列)の配列
@raise Net::IMAP::NoResponseError メールボックス...

JSON::Generator::GeneratorMethods::Object#to_json(state_or_hash = nil) -> String (107.0)

自身を to_s で文字列にした結果を JSON 形式の文字列に変換して返します。

...ォールバックのためのメソッドです。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::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.new("tanaka", 29)

tanaka.to_json # => "\"#<Person:0x00007ffdec0167c8>\""
tanaka.method(:to_json).owner # => JSON::Ext::Generator:...