121件ヒット
[1-100件を表示]
(0.032秒)
種類
- インスタンスメソッド (48)
- 文書 (37)
- クラス (24)
- 特異メソッド (12)
ライブラリ
- psych (84)
クラス
-
Psych
:: Handler (12) -
Psych
:: Nodes :: Node (12) -
Psych
:: Nodes :: Scalar (36)
キーワード
- Mapping (12)
-
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Parser (12)
- new (12)
- scalar (12)
- tag (12)
- value= (12)
検索結果
先頭5件
-
Psych
:: Nodes :: Scalar # value -> String (29119.0) -
scalar の値を返します。
...scalar の値を返します。
@see Psych::Nodes::Scalar#value=,
Psych::Nodes::Scalar.new... -
Psych
:: Nodes :: Scalar # value=(v) (17119.0) -
scalar の値を設定します。
...scalar の値を設定します。
@param v 設定する値
@see Psych::Nodes::Scalar#value,
Psych::Nodes::Scalar.new... -
Psych
:: Nodes :: Scalar . new(value , anchor=nil , tag=nil , plain=true , quoted=false , style=ANY) -> Psych :: Nodes:Scalar (11250.0) -
Scalar オブジェクトを生成します。
...Scalar オブジェクトを生成します。
value は scalar の値を文字列で指定します。
anchor には scalar に付加されている anchor を文字列で指定します。
anchor を付けない場合には nil を指定します。
tag には scalar に付加されている t......は次の値のいずれかです。
* 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 スカラー値
@param anchor 関連付... -
Psych
:: Handler # scalar(value , anchor , tag , plain , quoted , style) -> () (11149.0) -
スカラー値を見付けたときに呼び出されます。
...スカラー値を見付けたときに呼び出されます。
value にはスカラー値の文字列が渡されます。
anchor にはスカラー値に関連付けられた anchor の名前が文字列で渡されます。
anchor がない場合には nil が渡されます。
tag にはス......れかです。
* Psych::Nodes::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED
必要に応じてこのメソッドを override してください。
@param value スカラー値
@pa......ML ドキュメントには4つの文字列が含まれています。
scalar メソッドは 順に以下の引数で呼び出されます。
# value anchor tag plain quoted style
["foo", nil, "!str", false, false, 3 ]
["fun", "an... -
Psych
:: Parser (11072.0) -
YAML のパーサ。
...ュメントを
別のフォーマット変換したりします。
Psych::Emitter を使うとパースしたドキュメントを元通りに出力
することもできます。
Psych::Parser が生成するイベントは Psych::Handler
を見てください。
以下の例では 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 にパースの結果を......力をパース→YAMLフォーマットで STDERR に出力
という流れになっています。
parser = Psych::Parser.new(Psych::Emitter.new($stderr))
parser.parse($stdin)
Psych::Parser と Psych::TreeBuilder を組み合わせると
YAML の AST を構築することができます。... -
Psych
:: Nodes :: Mapping (11042.0) -
YAML の mapping http://yaml.org/spec/1.1/#mapping を表すクラスです。
...す。
Psych::Nodes::Mapping は 0 個以上の子ノードを持つことができます。
子ノードの個数は偶数でなければなりません。
子ノードは以下のいずれかクラスのインスタンスでなければなりません。
* Psych::Nodes::Sequence
* Psych::Node......s::Mapping
* Psych::Nodes::Scalar
* Psych::Nodes::Alias
子ノードは mapping のキーと値が交互に並んでいます。
ast = Psych.parse(<<EOS)
%YAML 1.1
---
x: y
u: v
EOS
p ast.root.children.map{|v| v.value } # => ["x", "y", "u", "v"]... -
Psych
:: Nodes :: Node # tag -> String | nil (11018.0) -
ノードに付加されたタグを返します。
...されていない場合は nil を返します。
ast = Psych.parse(<<EOS)
---
- !!str a
- b
EOS
p ast.root.children[0].value # => "a"
p ast.root.children[0].tag # => "tag:yaml.org,2002:str"
p ast.root.children[1].value # => "b"
p ast.root.children[1].tag # => nil... -
NEWS for Ruby 2
. 5 . 0 (78.0) -
NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...加。$? と同じです 14043
* Range
* Range.new no longer hides exceptions when comparing begin and
end with #<=> and raise a "bad value for range" ArgumentError
but instead lets the exception from the #<=> call go through.
7688
* Regexp
* Onigmo 6.1.3-669ac999761......追加 7360
* psych
* Psych 3.0.2 に更新しました
* Convert fallback option to a keyword argument
https://github.com/ruby/psych/pull/342
* Add :symbolize_names option to Psych.load, Psych.safe_load like JSON.parse
https://github.com/ruby/psych/pull/333, https....../ruby/psych/pull/337
* Add Psych::Handler#event_location
https://github.com/ruby/psych/pull/326
* Make frozen string literal = true
https://github.com/ruby/psych/pull/320
* Preserve time zone offset when deserializing times
https://github.com/ruby/psych/pull... -
NEWS for Ruby 3
. 0 . 0 (36.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* Interpolated String literals are no longer frozen when
`# frozen-string-literal: true` is used. 17104
* Magic comment `shareable_constant_value` added to freeze constants.
See {Magic Comments}[rdoc-ref:doc/syntax/comments.rdoc@Magic+Comments] for more details.
17273
* A {static a......When the environment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754
=== `--backtrace-limit` option
The `--backtrace-limit` option limits the m......oved support for YAML. 8382
* Use officially discouraged. Read OpenStruct@Caveats section.
* Pathname
* Ractor compatible.
* Psych
* Update to Psych 3.3.0
* This version is Ractor compatible.
* Reline
* Update to Reline 0.1.5
* RubyGems
* Update to RubyGems 3.2.3
*... -
NEWS for Ruby 3
. 1 . 0 (36.0) -
NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...字列がより厳密に整数に変換されるようになりました。
//emlist[Time.new][ruby]{
Time.new(2021, 12, 25, "+07:30")
#=> invalid value for Integer(): "+07:30" (ArgumentError)
//}
* Ruby 3.0 以前では、予期しない結果の 2021-12-25 07:00:00 が返されました。......* open-uri 0.2.0
* openssl 3.0.0
* optparse 0.2.0
* ostruct 0.5.2
* pathname 0.2.0
* pp 0.3.0
* prettyprint 0.1.1
* psych 4.0.3
* racc 1.6.0
* rdoc 6.4.0
* readline 0.0.3
* readline-ext 0.1.4
* reline 0.3.0
* resolv 0.2.1
* rinda 0.1.1......イズに応じて自動的に変更されることを意味します。 12913
* Psych 4.0では、デフォルトで Psych.load が Psych.safe_load に変更されました。この動作に移行するにはPsych 3.3.2を使用する必要があるかもしれません。 17866
== C API の更...