132件ヒット
[1-100件を表示]
(0.084秒)
別のキーワード
ライブラリ
- ビルトイン (12)
-
net
/ http (12) - optparse (12)
-
rexml
/ document (60) -
rubygems
/ specification (12) -
rubygems
/ version (24)
クラス
-
Encoding
:: UndefinedConversionError (12) -
Gem
:: Specification (12) -
Gem
:: Version (24) -
Net
:: HTTPResponse (12) - OptionParser (12)
-
REXML
:: Document (36) -
REXML
:: Instruction (24)
キーワード
- content (12)
- encoding (12)
-
error
_ char (12) -
http
_ version (12) -
rubygems
_ version (12) -
stand
_ alone? (12) - target (12)
-
to
_ s (12) - ver (12)
検索結果
先頭5件
-
Gem
:: Version # version -> String (18240.0) -
バージョン情報を文字列として返します。
...バージョン情報を文字列として返します。
//emlist[][ruby]{
version = Gem::Version.new("1.2.3a")
p version.to_s # => "1.2.3a"
p version.version # => "1.2.3a"
//}... -
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"
//}... -
Gem
:: Specification # rubygems _ version -> String (12303.0) -
この Gem パッケージを作成した RubyGems のバージョンを返します。
...この Gem パッケージを作成した RubyGems のバージョンを返します。... -
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"
//}... -
Gem
:: Version # to _ s -> String (3140.0) -
バージョン情報を文字列として返します。
...バージョン情報を文字列として返します。
//emlist[][ruby]{
version = Gem::Version.new("1.2.3a")
p version.to_s # => "1.2.3a"
p version.version # => "1.2.3a"
//}... -
Encoding
:: UndefinedConversionError # error _ char -> String (3108.0) -
エラーを発生させた1文字を文字列で返します。
...エラーを発生させた1文字を文字列で返します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
begin
ec.convert("\u{a0}")
rescue Encoding::UndefinedConversionError
puts $!.error_char.dump #=> "\u{a0}"
end
//}... -
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"
//}...