105件ヒット
[1-100件を表示]
(0.023秒)
種類
- インスタンスメソッド (55)
- モジュール関数 (22)
- 特異メソッド (11)
- ライブラリ (11)
- 文書 (6)
ライブラリ
- ビルトイン (11)
- json (55)
-
rubygems
/ source _ info _ cache (22)
クラス
-
Encoding
:: Converter (11) -
Gem
:: SourceInfoCache (22) -
JSON
:: Parser (33)
モジュール
- JSON (22)
キーワード
-
NEWS for Ruby 2
. 6 . 0 (6) - load (11)
- new (11)
- parse (11)
-
primitive
_ errinfo (11) -
read
_ all _ cache _ data (11) -
read
_ cache _ data (11) - restore (11)
- rss (11)
検索結果
先頭5件
-
JSON
:: Parser # source -> String (18113.0) -
現在のソースのコピーを返します。
...現在のソースのコピーを返します。
//emlist[例][ruby]{
require 'json'
parser = JSON::Parser.new(DATA.read)
print parser.source
# => {
# => "Tanaka": {
# => "name":"tanaka",
# => "age":20
# => },
# => "Suzuki": {
# => "name":"suzuki",
# => "age":25
# => }
#... -
Gem
:: SourceInfoCache # read _ all _ cache _ data -> () (9101.0) -
自身に完全なキャッシュファイルの内容をマージします。
自身に完全なキャッシュファイルの内容をマージします。 -
Gem
:: SourceInfoCache # read _ cache _ data(file) -> Hash (9101.0) -
与えられたファイル名からデータを読み込んでキャッシュデータを返します。
与えられたファイル名からデータを読み込んでキャッシュデータを返します。
@param file キャッシュのファイル名を指定します。
@return 内部で例外が発生した場合は、空のハッシュを返します。 -
rss (126.0)
-
RSS を扱うためのライブラリです。
...ールはそれぞれ、
* Dublin Core モジュール http://web.resource.org/rss/1.0/modules/dc/
* Syndication モジュール http://web.resource.org/rss/1.0/modules/syndication/
* Content モジュール http://web.resource.org/rss/1.0/modules/content/
* Trackback モジュール http://mad......skills.com/public/xml/rss/module/trackback/
* Image モジュール http://web.resource.org/rss/1.0/modules/image/
をサポートしています。
ただし,Content モジュールは content:encoded しかサポートしていません.
=== パース
RSS をパースしたい場合は RSS:......素名と
同じ名前のアクセサがあります。
==== リーダ(reader)
rdf:RDF 要素の子要素である channel 要素を参照するには,以下のよう
にします。
rss = RSS::Parser.parse(rss_source)
rss.channel # => /rdf:RDF/channel要素; RSS::RDF::Channel
もし、要... -
JSON
:: Parser . new(source , options => {}) -> JSON :: Parser (125.0) -
パーサを初期化します。
...ルトは Array です。
@param source パーサの元となる文字列を指定します。
@param options オプションを指定するためのハッシュです。
//emlist[例][ruby]{
require 'json'
parser = JSON::Parser.new(DATA.read)
print parser.source
# => {
# => "Tanaka": {
# =>......ass Person
attr_accessor :name, :age
def []=(key, value)
instance_variable_set("@#{key}", value)
end
end
parser = JSON::Parser.new(DATA.read, object_class: Person)
person = parser.parse
person.class # => Person
person.name # => "tanaka"
person.age # => 20
__END__
{
"name":"tanaka",... -
JSON
. # load(source , proc = nil , options = {}) -> object (120.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...}
# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指......、これらの値を生成しようとすると例外が発生します。デフォルトは真です。
: :allow_blank
真を指定すると、sourceがnilの場合にnilを返します。デフォルトは真です。
: :create_additions
偽を指定するとマッチするクラスや JSON.c... -
JSON
. # restore(source , proc = nil , options = {}) -> object (120.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...}
# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指......、これらの値を生成しようとすると例外が発生します。デフォルトは真です。
: :allow_blank
真を指定すると、sourceがnilの場合にnilを返します。デフォルトは真です。
: :create_additions
偽を指定するとマッチするクラスや JSON.c... -
JSON
. # load(source , proc = nil , options = {}) -> object (114.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...}
# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指... -
JSON
. # restore(source , proc = nil , options = {}) -> object (114.0) -
与えられた JSON 形式の文字列を Ruby オブジェクトとしてロードして返します。
...}
# 以下が表示される
# "a"
# 1
# "b"
# 2
# "c"
# 3
# {"a"=>1, "b"=>2, "c"=>3}
@param source JSON 形式の文字列を指定します。他には、to_str, to_io, read メソッドを持つオブジェクトも指定可能です。
@param proc Proc オブジェクトを指... -
NEWS for Ruby 2
. 6 . 0 (24.0) -
NEWS for Ruby 2.6.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...784
* Array#filter! が Array#select! の別名として追加されました。 13784
* Binding
* 新規メソッド
* Binding#source_location 追加 14230
* bindingのソースコード上の位置を __FILE__ と __LINE__ の二要素配列として返します。......した。
* Psych
* Psych 3.1.0 に更新されました。
* RDoc
* 約2倍高速化されました。
* ファイル生成に SOURCE_DATE_EPOCH を使うようになりました。
* メソッドの行番号がずれていたのを修正しました。
* 無視されて......トを渡すのは非推奨になる予定で、
今は警告が出ます。 14643
* File
* File.read, File.binread, File.write, File.binwrite,
File.foreach, File.readlines はパスがパイプ文字 '|' で始まっていても
外部コマンドを実行しなくなりま... -
Encoding
:: Converter # primitive _ errinfo -> Array (12.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_seq......エンコーディング、enc2 は変換先のエンコーディングです。
error_bytes はエラーの発生原因となったバイト列、readagain_bytes は先読みによって変換器内部に保持されているバイト列です。
primitive_errinfo はもっぱら Encoding::Convert......fo
#=> [:source_buffer_empty, nil, nil, nil, nil]
# \xd8\x00\x00@ is invalid as UTF-16BE because
# no low surrogate after high surrogate (\xd8\x00).
# It is detected by 3rd byte (\00) which is part of next character.
# So the high surrogate (\xd8\x00) is discarded and
# the 3rd byte is read again l... -
JSON
:: Parser # parse -> object (12.0) -
現在のソースをパースして結果を Ruby のオブジェクトとして返します。
...[]=(key, value)
instance_variable_set("@#{key}", value)
end
end
parser = JSON::Parser.new(DATA.read, object_class: Person)
person = parser.parse
person.class # => Person
person.name # => "tanaka"
person.age # => 20
__END__
{
"name":"tanaka",
"age":20
}
//}
@see JSON::Parser#source...