14件ヒット
[1-14件を表示]
(0.035秒)
種類
- インスタンスメソッド (8)
- 特異メソッド (5)
- クラス (1)
クラス
- Object (1)
-
Psych
:: Nodes :: Document (3) -
Psych
:: Nodes :: Mapping (3) -
Psych
:: Nodes :: Scalar (3) -
Psych
:: Nodes :: Sequence (3)
キーワード
- Parser (1)
- tag= (3)
-
tag
_ directives (1) -
tag
_ directives= (1) -
yaml
_ tag (1)
検索結果
先頭5件
- Psych
:: Nodes :: Document . new(version=[] , tag _ directives=[] , implicit=false) -> Psych :: Nodes :: Document - Psych
:: Nodes :: Scalar . new(value , anchor=nil , tag=nil , plain=true , quoted=false , style=ANY) -> Psych :: Nodes:Scalar - 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
:: Nodes :: Mapping # tag -> String|nil
-
Psych
:: Nodes :: Document . new(version=[] , tag _ directives=[] , implicit=false) -> Psych :: Nodes :: Document (88096.0) -
Document オブジェクトを生成します。
...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 :: Scalar . new(value , anchor=nil , tag=nil , plain=true , quoted=false , style=ANY) -> Psych :: Nodes:Scalar (88096.0) -
Scalar オブジェクトを生成します。
...します。
style は次の値のいずれかです。
* Psych::Nodes::Scalar::ANY
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED
@param value スカラー値
@para... -
Psych
:: Nodes :: Mapping . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Mapping (88060.0) -
新たな mapping オブジェクトを生成します。
...AML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Mapping::ANY
* Psych::Nodes::Mapping::BLOCK
* Psych::Nodes::Mapping::FLOW
@param anchor mapping に付加された anchor
@param tag mapping に付加された tag
@... -
Psych
:: Nodes :: Sequence . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Sequence (88060.0) -
新たな sequence オブジェクトを生成します。
...ML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nodes::Sequence::ANY
* Psych::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW
@param anchor sequence に付加された anchor
@param tag sequence に付加された t... -
Psych
:: Nodes :: Mapping # tag -> String|nil (87430.0) -
mapping に付加された tag を返します。
...mapping に付加された tag を返します。
@see Psych::Nodes::Mapping#tag=,
Psych::Nodes::Mapping.new... -
Psych
:: Nodes :: Scalar # tag -> String|nil (87430.0) -
scalar に付加された tag を返します。
...scalar に付加された tag を返します。
@see Psych::Nodes::Scalar#tag=,
Psych::Nodes::Scalar.new... -
Psych
:: Nodes :: Sequence # tag -> String|nil (87430.0) -
sequence に付加された tag を返します。
...sequence に付加された tag を返します。
@see Psych::Nodes::Sequence#tag=,
Psych::Nodes::Sequence.new... -
Psych
:: Nodes :: Document # tag _ directives=(tags) (51748.0) -
tag directive の配列を設定します。
...tag directive の配列を設定します。
@param tags 設定する tag directive の配列
@see Psych::Nodes::Document#tag_directives,
Psych::Nodes::Document.new... -
Psych
:: Nodes :: Scalar # tag=(t) (51448.0) -
scalar に付加された tag を変更します。
...scalar に付加された tag を変更します。
@param t 設定する tag
@see Psych::Nodes::Scalar#tag,
Psych::Nodes::Scalar.new... -
Psych
:: Nodes :: Document # tag _ directives -> [[String , String]] (51430.0) -
tag directive の配列を返します。
...tag directive の配列を返します。
@see Psych::Nodes::Document#tag_directives=,
Psych::Nodes::Document.new... -
Psych
:: Nodes :: Mapping # tag=(t) (51430.0) -
mapping に付加する tag を設定します。
...mapping に付加する tag を設定します。
@param t 設定する tag
@see Psych::Nodes::Mapping#anchor=,
Psych::Nodes::Mapping.new... -
Psych
:: Nodes :: Sequence # tag=(t) (51430.0) -
sequence に付加する tag を設定します。
...sequence に付加する tag を設定します。
@param t 設定する tag
@see Psych::Nodes::Sequence#anchor=,
Psych::Nodes::Sequence.new... -
Object
. yaml _ tag(tag) -> () (42877.0) -
クラスと tag の間を関連付けます。
...g 対象のクラスに関連付けるタグの文字列
=== Example
require 'psych'
class Foo
def initialize(x)
@x = x
end
attr_reader :x
end
# Dumps Ruby object normally
p Psych.dump(Foo.new(3))
# =>
# --- !ruby/object:Foo
# x: 3
# Registers tag......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 node
p Psych.load(<<EOS)
--- !<tag:example.com,2012:foo>
x: 8
EOS
# => #<Foo:0x00... -
Psych
:: Parser (33277.0) -
YAML のパーサ。
...ュメントを
別のフォーマット変換したりします。
Psych::Emitter を使うとパースしたドキュメントを元通りに出力
することもできます。
Psych::Parser が生成するイベントは Psych::Handler
を見てください。
以下の例では YAML ドキ......or 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 にパースの結果を戻していま......力をパース→YAMLフォーマットで STDERR に出力
という流れになっています。
parser = Psych::Parser.new(Psych::Emitter.new($stderr))
parser.parse($stdin)
Psych::Parser と Psych::TreeBuilder を組み合わせると
YAML の AST を構築することができます。...