350件ヒット
[101-200件を表示]
(0.050秒)
ライブラリ
- psych (231)
-
yaml
/ store (19)
クラス
- Object (11)
-
Psych
:: Nodes :: Document (33) -
Psych
:: Nodes :: Mapping (11) -
Psych
:: Nodes :: Sequence (11) -
Psych
:: Parser (22) -
Psych
:: ScalarScanner (11) -
Psych
:: Stream (33) -
Psych
:: Visitors :: YAMLTree (11) -
YAML
:: Store (19)
モジュール
- Psych (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Emitter (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - Nodes (11)
- Parser (11)
- Stream (11)
- TreeBuilder (11)
- YAMLTree (11)
- dump (22)
- irb (11)
- parse (11)
- rdoc (11)
-
ruby 1
. 8 . 2 feature (11) - rubygems (11)
- start (22)
- tokenize (11)
- version (11)
- version= (11)
-
yaml
/ store (11) -
yaml
_ tag (11)
検索結果
先頭5件
- Psych
:: Nodes :: Document . new(version=[] , tag _ directives=[] , implicit=false) -> Psych :: Nodes :: Document - Psych
:: Nodes :: Mapping . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Mapping - Psych
:: Nodes :: Sequence . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Sequence - Psych
:: Stream . new(io) -> Psych :: Stream - Object
. yaml _ tag(tag) -> ()
-
Psych
:: Nodes :: Document . new(version=[] , tag _ directives=[] , implicit=false) -> Psych :: Nodes :: Document (18119.0) -
Document オブジェクトを生成します。
...真偽値で指定します。
@param version YAML ドキュメントのバージョン
@param tag_directives tag directive の配列
@param implicit ドキュメントが implicit に始まっているかどうか
=== 例
以下の例では、YAML 1.1 のドキュメントで、
tag directive......を1つ持ち、 implicit にドキュメントが開始
している Document オブジェクトを生成しています。
Psych::Nodes::Document.new(
[1,1],
tenderlovemaking.com,2009:",
true)
@see Psych::Handler#start_document... -
Psych
:: Nodes :: Mapping . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Mapping (18113.0) -
新たな mapping オブジェクトを生成します。
...は nil を指定します。
implicit には mapping が implicit に開始されたかどうかを
真偽値で指定します。
style には YAML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Mapping::ANY
* Psych......::Nodes::Mapping::BLOCK
* Psych::Nodes::Mapping::FLOW
@param anchor mapping に付加された anchor
@param tag mapping に付加された tag
@param implicit mapping が implicit に開始されたかどうか
@param style YAML ドキュメント上の style... -
Psych
:: Nodes :: Sequence . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Sequence (18113.0) -
新たな sequence オブジェクトを生成します。
...は nil を指定します。
implicit には sequence が implicit に開始されたかどうかを
真偽値で指定します。
style には YAML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Sequence::ANY
* Psy......ch::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW
@param anchor sequence に付加された anchor
@param tag sequence に付加された tag
@param implicit sequence が implicit に開始されたかどうか
@param style YAML ドキュメント上の style... -
Psych
:: Stream . new(io) -> Psych :: Stream (18107.0) -
新たな Stream オブジェクトを生成します。
...新たな Stream オブジェクトを生成します。
io で YAML document の出力先を指定します。
@param io 出力先の IO オブジェクト... -
Object
. yaml _ tag(tag) -> () (6131.0) -
クラスと tag の間を関連付けます。
...クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
@param tag 対象のクラスに関連付けるタグの文字列
=== Example
requir......new(3))
# =>
# --- !ruby/object:Foo
# x: 3
# Registers tag with class Foo
Foo.yaml_as("tag:example.com,2013:foo")
# ... and dumps the object of Foo class
Psych.dump(Foo.new(3), STDOUT)
# =>
# --- !<tag:example.com,2013:foo>
# x: 3
# Loads the object from the tagged YAML... -
yaml
/ store (6052.0) -
RubyのオブジェクトをYAML形式の外部ファイルに格納するためのクラスです。
...byのオブジェクトをYAML形式の外部ファイルに格納するためのクラスです。
例:
require 'yaml/store'
Person = Struct.new :first_name, :last_name
people = [Person.new("Bob", "Smith"), Person.new("Mary", "Johnson")]
store = YAML::Store.new "test.store"
store.tr... -
Psych
:: Visitors :: YAMLTree (6028.0) -
Ruby オブジェクトから YAML の AST を構築するためのクラスです。
...クトから YAML の AST を構築するためのクラスです。
=== 例
builder = Psych::Visitors::YAMLTree.new
builder << { :foo => 'bar' }
builder << ["baz", "bazbaz"]
builder.tree # => #<Psych::Nodes::Stream ... > A stream containing two documents
puts tree.to_yaml
# =>
# ---... -
Psych
:: Parser # parse(yaml) -> self (123.0) -
YAML ドキュメントをパースし、イベントハンドラに イベントを逐次通知します。
...
YAML ドキュメントをパースし、イベントハンドラに
イベントを逐次通知します。
@see Psych::Parser.new, Psych::Handler, Psych::Parser#handler... -
Psych
:: Parser (82.0) -
YAML のパーサ。
...YAML のパーサ。
このクラスは YAML ドキュメントをパースし、コンストラクタに渡された
ハンドラにイベントを通知(呼び出し)します。
このイベントを使って YAML の AST を構築したり YAML ドキュメントを
別のフォーマット変...... YAML ドキュメント に含まれているスカラー値を表示します。
# Handler for detecting scalar values
class ScalarHandler < Psych::Handler
def scalar value, anchor, tag, plain, quoted, style
puts value
end
end
parser = Psych::Parser.new(ScalarHandler.new)......parser.parse(yaml_document)
次の例は Psych::Emitter にパースの結果を戻しています。
STDIN からの入力をパース→YAMLフォーマットで STDERR に出力
という流れになっています。
parser = Psych::Parser.new(Psych::Emitter.new($stderr))
parser.parse($st... -
Psych
:: Nodes (78.0) -
Psych が中間データとして利用している AST (Abstract Syntax Tree) に 関するモジュール。
...h.load によって YAML ドキュメントを Ruby オブジェクトに変換
するときには、一度中間的な AST に変換され、その AST が Ruby の
オブジェクトに変換されます。
逆向き、つまり Psych.dump で Ruby のオブジェクトを
YAML ドキュメント......中間的な AST に変換してから
それを YAML ドキュメントに変換します。
YAML AST の各ノードのクラスはすべて Psych::Nodes の下にあります。
AST を手作業で構築して、visitor を使って AST を YAML ドキュメントや
Ruby のオブジェクト.......new
doc = Psych::Nodes::Document.new
seq = Psych::Nodes::Sequence.new
scalar = Psych::Nodes::Scalar.new('foo')
# Build up our tree
stream.children << doc
doc.children << seq
seq.children << scalar
stream は AST のルートです。以下のようにして AST を YAML...