660件ヒット
[1-100件を表示]
(0.034秒)
別のキーワード
ライブラリ
- ビルトイン (144)
- json (132)
- objspace (108)
- prettyprint (12)
- rake (48)
-
rexml
/ document (168)
クラス
-
JSON
:: State (84) -
ObjectSpace
:: WeakMap (12) - PrettyPrint (12)
-
REXML
:: Attribute (12) -
REXML
:: Attributes (24) -
REXML
:: CData (12) -
REXML
:: Element (72) -
REXML
:: Text (12) -
REXML
:: XPath (36) -
Rake
:: NameSpace (36)
モジュール
- JSON (48)
- ObjectSpace (228)
-
Rake
:: TaskManager (12)
キーワード
- Ruby用語集 (12)
- UndefinedConversionError (12)
- [] (12)
- []= (12)
-
_ id2ref (12) -
add
_ namespace (24) -
allocation
_ sourcefile (12) -
allocation
_ sourceline (12) - attribute (12)
-
count
_ nodes (12) -
count
_ objects (12) -
count
_ objects _ size (12) -
count
_ tdata _ objects (12) -
define
_ finalizer (24) -
delete
_ namespace (12) - each (12)
-
each
_ object (48) - first (12)
- format (12)
-
garbage
_ collect (12) - generate (12)
-
get
_ attribute _ ns (12) -
in
_ namespace (12) - match (12)
-
memsize
_ of (12) -
memsize
_ of _ all (12) - namespace (24)
- namespaces (24)
- new (48)
-
pretty
_ generate (12) -
pretty
_ unparse (12) -
reachable
_ objects _ from (12) -
rinda
/ rinda (12) -
rinda
/ tuplespace (12) - space= (12)
-
space
_ before (12) -
space
_ before= (12) - tasks (12)
-
to
_ h (12) -
to
_ hash (12) -
trace
_ object _ allocations (12) -
undefine
_ finalizer (12) - unparse (12)
- 正規表現 (12)
検索結果
先頭5件
-
JSON
:: State # space -> String (18131.0) -
JSON 形式の文字列のトークン間に挿入する文字列を返します。
...//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space: "")
json_state.space # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(space: "\t")
json_state.space # => "... -
Rake
:: TaskManager # in _ namespace(name) {|name _ space| . . . } -> Array (6207.0) -
与えられた名前の名前空間でブロックを評価します。
...ます。
@param name 名前を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
namespace :sample do
def hoge
puts "hoge"
end
end
task :test_rake_app do
task.application.in_namespace("sample") do
hoge # => "hoge"
end
end
//}... -
REXML
:: Element # delete _ namespace(namespace = "xmlns") -> self (6206.0) -
名前空間を要素から削除します。
...削除します。
@param namespace 削除する名前空間の prefix
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new "<a xmlns:foo='bar' xmlns='twiddle'/>"
doc.root.delete_namespace
doc.to_s # => "<a xmlns:foo='bar'/>"
doc.root.delete_namespace 'foo'
doc.to_s # => "<a/>"
//}... -
JSON
:: State # space=(string) (6131.0) -
JSON 形式の文字列のトークン間に挿入する文字列をセットします。
...ます。
//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space: "")
json_state.space # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.space = "\t"
json_state.space # => "\t"
puts... -
JSON
:: State # space _ before -> String (6131.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。
...st[例][ruby]{
require "json"
json_state = JSON::State.new(space_before: "")
json_state.space_before # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state = JSON::State.new(space_before: " ")
json_state.space_before... -
JSON
:: State # space _ before=(string) (6131.0) -
JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列をセットします。
...//emlist[例][ruby]{
require "json"
json_state = JSON::State.new(space_before: "")
json_state.space_before # => ""
puts JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name":"tanaka","age":19}]
json_state.space_before = " "
json_state.space_before... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (6106.0) -
属性の名前空間の URI を返します。
...略します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.c... -
REXML
:: Attributes # namespaces -> { String => String } (6106.0) -
self の中で宣言されている名前空間の集合を返します。
...//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = doc.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"foo"=......>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # add _ namespace(prefix , uri) -> self (6106.0) -
名前空間を要素に追加します。
...ルトの namespace の uri を指定します。
既に同じ prefix が存在する場合はそれが上書きされます。
@param prefix 名前空間の prefix
@param uri 名前空間の uri
//emlist[][ruby]{
require 'rexml/document'
a = REXML::Element.new("a")
a.add_namespace("xmlns:foo", "......bar" )
a.add_namespace("foo", "bar") # 上と同じ意味
a.add_namespace("twiddle")
a.to_s # => "<a xmlns:foo='bar' xmlns='twiddle'/>"
a.add_namespace("foo", "baz")
a.to_s # => "<a xmlns:foo='baz' xmlns='twiddle'/>"
//}...