るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

キーワード

検索結果

REXML::Document#version -> String (18221.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"
//}...

Net::HTTPResponse#http_version -> String (6215.0)

サーバがサポートしている HTTP のバージョンを文字列で返します。

...サーバがサポートしている HTTP のバージョンを文字列で返します。

//emlist[例][ruby]{
require
'net/http'

uri = "http://www.example.com/index.html"
response = Net::HTTP.get_response(URI.parse(uri))
response.http_version # => "1.1"
//}...

WEBrick::HTTPVersion#to_s -> String (3108.0)

自身を文字列に変換して返します。

...自身を文字列に変換して返します。

require
'webrick'
v = WEBrick::HTTPVersion.new('1.1')
p v.to_s #=> "1.1"...

OptionParser#ver -> String (142.0)

program_name、version と release から生成したバージョンを表す文字列を返します。

...program_name、version と release から生成したバージョンを表す文字列を返します。

//emlist[例][ruby]{
require
"optparse"

OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release...
...= "2019-05-01"

opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Example 0.1 (2019-05-01)"
exit
end

opts.parse!(ARGV)
end
//}...

REXML::Document#encoding -> String (114.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 (114.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 (114.0)

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

...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-...

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

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

...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-st...