るりまサーチ

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

別のキーワード

  1. _builtin <
  2. bigdecimal <
  3. integer <
  4. float <
  5. module <

ライブラリ

キーワード

検索結果

REXML::Document#version -> String (18120.0)

XML 宣言に含まれている XML 文書のバージョンを返します。

...XML 宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<
e />
EOS
doc.version # => "1.0"
//}...

Gem::Version#<=>(other) -> -1 | 0 | 1 | nil (9165.0)

self と other を比較して、self が小さい時に -1、 等しい時に 0、大きい時に 1 の整数を返します。 また、other が Gem::Version ではなく比較できないとき、 nil を返します。

...other が Gem::Version ではなく比較できないとき、 nil を返します。

//emlist[][ruby]{
p Gem::Version.new("3.9.0") <=> Gem::Version.new("3.10.0") # => -1
p Gem::Version.new("3.0.0") <=> Gem::Version.new("3.0.0") # => 0
p Gem::Version.new("3.0.0") <=> Gem::Version.new("3.0")...
...# => 0

p Gem::Version.new("3.9.0") <=> "3.9.0" # => nil
//}

@param other 比較対象の Gem::Version のインスタンスを指定します。...

WEBrick::HTTPVersion#<=>(other) -> -1 | 0 | 1 | nil (9107.0)

自身と指定された other のバージョンを比較します。 自身が other より新しいなら 1、同じなら 0、古いなら -1 を返します。 比較できない場合に nil を返します。

...を返します。
比較できない場合に nil を返します。

@param other HTTP のバージョンを表す WEBrick::HTTPVersion オブジェクトか文字列を指定します。

require 'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v < '1.0' #=> false...

REXML::Document#encoding -> String (13.0)

XML 宣言に含まれている XML 文書のエンコーディングを返します。

...宣言を持たない場合はデフォルトの値
(REXML::XMLDecl.defaultで宣言されているもの)を返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<
e />
EOS
doc.encoding # => "UTF-8"
//}...

REXML::Document#stand_alone? -> String (13.0)

XML 宣言の standalone の値を文字列で返します。

...XML 宣言の standalone の値を文字列で返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<
?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<
e />
EOS
doc.stand_alone? # => "yes"
//}...

絞り込み条件を変える

REXML::Instruction#content -> String | nil (13.0)

XML 処理命令の内容を返します。

...ます。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<
?xml version="1.0" encoding="utf-8" ?>
<
?xml-stylesheet type="text/css" href="style.css"?>
<
?foobar?>
<
root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "t...

REXML::Instruction#target -> String (13.0)

XML 処理命令のターゲットを返します。

...返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<
?xml version="1.0" encoding="utf-8" ?>
<
?xml-stylesheet type="text/css" href="style.css"?>
<
root />
EOS
doc[2] # => <?p-i xml-stylesheet ...?>
doc[2].target # => "xml-stylesheet"
doc[2].content # => "type=\...