1215件ヒット
[1-100件を表示]
(0.108秒)
ライブラリ
-
irb
/ context (12) - psych (710)
-
rubygems
/ commands / specification _ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ exceptions (12) -
rubygems
/ package / tar _ input (12) -
rubygems
/ server (12) -
rubygems
/ specification (36) - yaml (12)
-
yaml
/ dbm (240) -
yaml
/ store (33)
クラス
-
Gem
:: ConfigFile (12) -
Gem
:: Package :: TarInput (12) -
Gem
:: Server (12) -
Gem
:: Specification (36) -
IRB
:: Context (12) - Module (8)
- Object (36)
-
Psych
:: Handler (84) -
Psych
:: Nodes :: Document (36) -
Psych
:: Nodes :: Mapping (12) -
Psych
:: Nodes :: Node (36) -
Psych
:: Nodes :: Sequence (12) -
Psych
:: ScalarScanner (12) -
Psych
:: Stream (48) -
Psych
:: Visitors :: YAMLTree (120) -
RDoc
:: Options (12) -
YAML
:: DBM (240) -
YAML
:: Store (21)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (12)
- Document (12)
- Emitter (12)
- EndOfYAMLException (12)
-
LIBYAML
_ VERSION (12) -
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 3
. 1 . 0 (4) - Set (12)
- SpecificationCommand (12)
- Store (12)
- Stream (24)
- SyntaxError (12)
- TreeBuilder (12)
- VERSION (12)
- YAMLTree (12)
- [] (12)
- []= (12)
- delete (12)
-
delete
_ if (12) - dump (24)
-
dump
_ stream (12) -
end
_ document (12) -
end
_ stream (12) - fetch (12)
- finish (24)
- finished (12)
- finished? (12)
-
from
_ yaml (12) - index (12)
-
inspect
_ mode= (12) - invert (12)
- key (12)
-
libyaml
_ version (12) - load (15)
-
load
_ documents (8) -
load
_ file (24) -
load
_ gemspec (12) -
load
_ stream (24) - new (81)
-
normalize
_ yaml _ input (12) - parse (12)
-
parse
_ file (12) -
parse
_ stream (24) -
psych
_ to _ yaml (12) -
psych
_ y (12) -
psych
_ yaml _ as (4) - push (12)
- rdoc (12)
- reject (12)
- replace (12)
-
ruby 1
. 8 . 2 feature (12) -
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / specification _ command (12) -
safe
_ load (19) - scalar (12)
- select (24)
- shift (12)
- start (36)
-
start
_ document (12) -
start
_ mapping (12) -
start
_ sequence (12) -
start
_ stream (12) - started (12)
- started? (12)
- store (12)
- tag (12)
-
to
_ a (12) -
to
_ hash (12) -
to
_ yaml (24) - tokenize (12)
- tree (12)
- update (12)
- values (12)
-
values
_ at (12) - version (12)
- version= (12)
- y (12)
- yaml (36)
-
yaml
/ store (12) -
yaml
_ as (4) -
yaml
_ initialize (12) -
yaml
_ tag (12)
検索結果
先頭5件
-
YAML (38072.0)
-
YAML (YAML Ain't Markup Language) を扱うモジュールです。
...YAML (YAML Ain't Markup Language) を扱うモジュールです。
YAML オブジェクトは実際は Psych オブジェクトです。その他のオブジェ
クトも同様に実体は別のオブジェクトです。もし確認したいメソッドの記述が
見つからない場合は、p......sych ライブラリを確認してください。
//emlist[例][ruby]{
require "yaml"
p YAML # => Psych
p YAML::Stream # => Psych::Stream
//}... -
Gem
:: Specification # yaml _ initialize (15201.0) -
@todo
...@todo... -
Object
. yaml _ tag(tag) -> () (12319.0) -
クラスと tag の間を関連付けます。
...クラスと tag の間を関連付けます。
これによって tag 付けされた YAML ドキュメントを Ruby のオブジェクトに
変換したりその逆をしたりすることができます。
@param tag 対象のクラスに関連付けるタグの文字列
=== Example
requir......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 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 node
p Psych.load(<<EOS)
--- !<tag:example.com,2012:foo>
x: 8
EOS
# => #<Foo:0x0000000130f48 @x=8>... -
Object
# psych _ to _ yaml(options = {}) -> String (12242.0) -
オブジェクトを YAML document に変換します。
...オブジェクトを YAML document に変換します。
options でオプションを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。......将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Object
# to _ yaml(options = {}) -> String (12242.0) -
オブジェクトを YAML document に変換します。
...オブジェクトを YAML document に変換します。
options でオプションを指定できます。
Psych.dump と同じなので詳しくはそちらを参照してください。
syck に to_yaml メソッドがあるため、
psych_to_yaml が別名として定義されています。......将来的に
syck が廃止された場合 psych_to_yaml は廃止
される予定であるため、特別の事情がない限り to_yaml を用いてください。
@param options 出力オプション
@see Psych.dump... -
Psych
:: Nodes :: Node # to _ yaml(io=nil , options={}) -> String | IO (12224.0) -
AST を YAML ドキュメントに変換します。
...AST を YAML ドキュメントに変換します。
io に IO オブジェクトを指定した場合は、その
オブジェクトに変換後のドキュメントが書き込まれます。
この場合は io を返り値として返します。
io を省略した(nil を指定した)場合......メントを
文字列で返します。
Psych::Nodes::Stream 以外を変換しようとすると、AST として不正で
あるためエラーが発生します。
options には以下が指定できます。
: :version
YAML document に付加するバージョンを [major, minor] という......entation
インデントのレベルを 1 から 9 までの整数で指定します
: :canonical
出力の style が canonical であるかどうかを真偽値で指定します
: :line_width
「好ましい」行幅を整数値で指定します
@param io 書き込み先の IO
@param optio... -
Gem
:: Specification . normalize _ yaml _ input(input) -> String (12217.0) -
YAML 形式の gemspec を正しくフォーマットします。
...
YAML 形式の gemspec を正しくフォーマットします。
@param input 文字列か IO オブジェクトを指定します。... -
yaml
/ store (12028.0) -
RubyのオブジェクトをYAML形式の外部ファイルに格納するためのクラスです。
...を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.transaction do
store[......store["greeting"] = { "hello" => "world" }
end
上記のコードを実行すると "test.store" は以下のようになります。
---
people:
- !ruby/struct:Person
first_name: Bob
last_name: Smith
- !ruby/struct:Person
first_name: Mary
last_name: Johnson
greeting... -
Psych
:: Visitors :: YAMLTree (12022.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
# =>
# ---...