るりまサーチ

最速Rubyリファレンスマニュアル検索!
474件ヒット [1-100件を表示] (0.070秒)

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. complex >
  5. module >

検索結果

<< 1 2 3 ... > >>

JSON::State#space -> String (18226.0)

JSON 形式の文字列のトークン間に挿入する文字列を返します。

...son"

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 # => "\t"
puts JSON.generate([1, 2, { n...
...ame: "tanaka", age: 19 }], json_state)
# => [1,2,{"name": "tanaka","age": 19}]
//}...

REXML::Attributes#namespaces -> { String => String } (6307.0)

self の中で宣言されている名前空間の集合を返します。

...p://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;'/>
</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
# => {}
//}...

Rake::TaskManager#in_namespace(name) {|name_space| ... } -> Array (6302.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
//}...

IRB::Context#workspace -> IRB::WorkSpace (6301.0)

ライブラリ内部で使用します。

ライブラリ内部で使用します。

Kernel#namespace(name = nil) { ... } -> Rake::NameSpace (6301.0)

新しい名前空間を作成します。

...新しい名前空間を作成します。

与えられたブロックを評価する間は、その名前空間を使用します。

例:
ns = namespace "nested" do
task :run
end
task_run = ns[:run] # find :run in the given namespace.

@see Rake::TaskManager#in_namespace...

絞り込み条件を変える

REXML::Element#delete_namespace(namespace = "xmlns") -> self (6301.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/>"
//}...

REXML::Element#namespaces -> {String => String} (6301.0)

self の文脈で定義されている名前空間の情報を返します。

...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}...

JSON::State#space_before -> String (6226.0)

JSON 形式の文字列中で JavaScript のオブジェクトを表す部分にある ':' の 前に挿入する文字列を返します。

...ate = 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 # => " "
puts JSON.genera...
...te([1, 2, { name: "tanaka", age: 19 }], json_state)
# => [1,2,{"name" :"tanaka","age" :19}]
//}...

PrettyPrint#genspace -> Proc (6201.0)

空白を生成する Proc を返します。

空白を生成する Proc を返します。

REXML::Attribute#namespace(arg = nil) -> String | nil (6201.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.com/ns"
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>