るりまサーチ

最速Rubyリファレンスマニュアル検索!
294件ヒット [101-200件を表示] (0.048秒)

別のキーワード

  1. string []=
  2. string slice
  3. string slice!
  4. string []
  5. string gsub!

検索結果

<< < 1 2 3 > >>

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"
//}...

REXML::Element#namespace(prefix=nil) -> String (6201.0)

self の文脈で prefix が指している名前空間の URI を返します。

...ます。

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

REXML::Namespace#local_name -> String (3102.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

REXML::Namespace#name -> String (3102.0)

prefix を含まない「ローカルな」名前を返します。

prefix を含まない「ローカルな」名前を返します。

ObjectSpace.#allocation_sourcefile(object) -> String (3101.0)

objectの元となったソースファイル名を返します。

...][ruby]{
require 'objspace'

ObjectSpace::trace_object_allocations_start
obj = Object.new
puts "file:#{ObjectSpace::allocation_sourcefile(obj)}" # => file:test.rb
ObjectSpace::trace_object_allocations_stop
//}

@see ObjectSpace.#trace_object_allocations_start,
ObjectSpace.#trace_object_alloca...

絞り込み条件を変える

REXML::Namespace#expanded_name -> String (3101.0)

REXML::Namespace#name= で設定された名前を返します。

...REXML::Namespace#name= で設定された名前を返します。

name= で指定した名前が prefix を含んでいれば
prefix を含む名前を返し、そうでなければ
prefix を含まない名前を返します。

@see REXML::Namespace#prefix...

REXML::Namespace#fully_expanded_name -> String (3101.0)

完全修飾名を返します。

完全修飾名を返します。

REXML::Namespace#prefix -> String (3101.0)

prefix (前置修飾子) を返します。

...prefix (前置修飾子) を返します。

@see REXML::Namespace#prefix=...

ObjectSpace.#count_objects_size(result_hash = nil) -> Hash (3006.0)

型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。

...あります。特に T_DATA の合計値は正しくないでしょう。

//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}

@raise TypeError result_hash にハッシュ以外を指定した時に発生しま...

JSON.#generate(object, state = nil) -> String (144.0)

与えられたオブジェクトを一行の JSON 形式の文字列に変換して返します。

...空文字列です。
: :space
a string that is put after, a : or , delimiter (default: '')
: :space_before
a string that is put before a : pair delimiter (default: '')
: :object_nl
a string that is put at the end of a JSON object (default: '')
: :array_nl
a string that is put at the end of...
...uby]{
require "json"

JSON.generate([1, 2, { name: "tanaka", age: 19 }])
# => "[1,2,{\"name\":\"tanaka\",\"age\":19}]"
json_state = JSON::State.new(space: " ")
JSON.generate([1, 2, { name: "tanaka", age: 19 }], json_state)
# => "[1,2,{\"name\": \"tanaka\",\"age\": 19}]"
//}

@see JSON::State, JSON.#...

絞り込み条件を変える

<< < 1 2 3 > >>