192件ヒット
[1-100件を表示]
(0.086秒)
別のキーワード
ライブラリ
- ipaddr (12)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) -
rdoc
/ context (12) -
rdoc
/ top _ level (12) -
rexml
/ document (24) -
rubygems
/ source _ index (12)
クラス
- BigDecimal (12)
- Complex (12)
- Date (12)
- DateTime (12)
- Exception (12)
-
Gem
:: SourceIndex (12) - IPAddr (12)
-
RDoc
:: Context (12) -
RDoc
:: TopLevel (12) -
REXML
:: Element (24) - Range (12)
- Rational (12)
- Regexp (12)
- Struct (12)
- Time (12)
キーワード
-
add
_ attributes (12) -
add
_ class _ or _ module (24) -
add
_ element (12) -
add
_ specs (12) -
to
_ json (120)
検索結果
先頭5件
- IPAddr
# hash -> Integer - Gem
:: SourceIndex # add _ specs(*gem _ specs) -> Hash - REXML
:: Element # add _ attributes(attrs) -> () - REXML
:: Element # add _ element(element , attrs = nil) -> Element - RDoc
:: Context # add _ class _ or _ module(collection , class _ type , name , superclass = nil) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule
-
IPAddr
# hash -> Integer (21108.0) -
ハッシュ値を返します。
...ハッシュ値を返します。
@see Object#hash... -
Gem
:: SourceIndex # add _ specs(*gem _ specs) -> Hash (6203.0) -
自身に引数で与えられた Gem::Specification のインスタンスを全て追加します。
自身に引数で与えられた Gem::Specification のインスタンスを全て追加します。
@param gem_specs 複数の Gem::Specification のインスタンスを指定します。 -
REXML
:: Element # add _ attributes(attrs) -> () (6132.0) -
要素の属性を複数追加します。 同じ名前の属性がすでにある場合はその属性を新しい 属性で置き換えます。
...。
同じ名前の属性がすでにある場合はその属性を新しい
属性で置き換えます。
attrs には Hash もしくは Array を指定できます。
Hash の場合は、
{ "name1" => "value1", "name2" => "value2", ... }
という形で、配列の場合は
[ ["name1", "valu......する属性の属性名と属性値の対の集合(Array or Hash)
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("e")
e.add_attributes({"a" => "b", "c" => "d"})
e # => <e a='b' c='d'/>
e = REXML::Element.new("e")
e.add_attributes([["a", "b"], ["c", "d"]])
e # => <e a='b' c='d'/>... -
REXML
:: Element # add _ element(element , attrs = nil) -> Element (6132.0) -
子要素を追加します。
...されます。
文字列を指定した場合は、それを要素名とする要素を追加します。
attrs に { String => String } という Hash を渡すと、
追加する要素の属性を指定できます。
子要素の最後に追加されます。
返り値は追加された要素......する属性
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a/>')
el = doc.root.add_element 'my-tag' # => <my-tag/>
doc.root.to_s # => "<a><my-tag/></a>"
el = doc.root.add_element 'my-tag', {'attr1'=>'val1', 'attr2'=>'val2'}
# => <my-tag attr1='val1' attr2='val2'/>
doc.root.......to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/></a>"
el = REXML::Element.new 'my-tag'
doc.root.add_element el # => <my-tag/>
doc.root.to_s # => "<a><my-tag/><my-tag attr1='val1' attr2='val2'/><my-tag/></a>"
//}
@see REXML::Elements#add, REXML::Element.new... -
RDoc
:: Context # add _ class _ or _ module(collection , class _ type , name , superclass = nil) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (6108.0) -
collection に name で指定したクラス、モジュールを追加します。
...lection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、... -
RDoc
:: TopLevel # add _ class _ or _ module(collection , class _ type , name , superclass) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (6108.0) -
collection に name で指定したクラス、モジュールを追加します。
...lection に name で指定したクラス、モジュールを追加します。
@param collection クラス、モジュールを追加する先を Hash オブジェ
クトで指定します。
@param class_type 追加するクラス、モジュールを RDoc::NormalClass、... -
BigDecimal
# to _ json(*args) -> String (25.0) -
自身を JSON 形式の文字列に変換して返します。
...してから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json
に渡されます。
//emlist[例][ruby]{
require 'json/add/bigdecimal'
BigDecimal('0.123456789123456789').to_j......son # => "{\"json_class\":\"BigDecimal\",\"b\":\"36:0.123456789123456789e0\"}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
Complex
# to _ json(*args) -> String (25.0) -
自身を JSON 形式の文字列に変換して返します。
...してから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json
に渡されます。
//emlist[例][ruby]{
require 'json/add/complex'
Complex(2, 3).to_json # => "{\"json_class\......":\"Complex\",\"r\":2,\"i\":3}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
Date
# to _ json(*args) -> String (25.0) -
自身を JSON 形式の文字列に変換して返します。
...ットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
Date.today.to_json
# => "{\"json_class\":\"Date\",......\"y\":2018,\"m\":12,\"d\":11,\"sg\":2299161.0}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json... -
DateTime
# to _ json(*args) -> String (25.0) -
自身を JSON 形式の文字列に変換して返します。
...ットしてから JSON::Generator::GeneratorMethods::Hash#to_json を呼び出しています。
@param args 引数はそのまま JSON::Generator::GeneratorMethods::Hash#to_json に渡されます。
//emlist[例][ruby]{
require "json/add/core"
DateTime.now.to_json
# => "{\"json_class\":\"DateT......ime\",\"y\":2018,\"m\":12,\"d\":10,\"H\":1,\"M\":28,\"S\":57,\"of\":\"3/8\",\"sg\":2299161.0}"
//}
@see JSON::Generator::GeneratorMethods::Hash#to_json...