るりまサーチ

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

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< 1 2 3 ... > >>

Rake::FileList#ext(newext = &#39;&#39;) -> Rake::FileList (21336.0)

各要素に String#ext を適用した新しい Rake::FileList を返します。

...String#ext を適用した新しい Rake::FileList を返します。

//emlist[][ruby]{
# Rakefile での記載例とする

IO.write("test1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")...
...file_list.ext(".erb") # => ["test1.erb", "test2.erb", "test3.erb"]
end
//}

@see String#ext...

URI::MailTo#to_rfc822text -> String (12237.0)

URI オブジェクトからメールテキスト文字列を生成します。

...URI オブジェクトからメールテキスト文字列を生成します。

例:
r
equire 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...
...cc=myaddr>
To: ruby-list@ruby-lang.org
Subject: subscribe
Cc: myaddr...

RubyVM::InstructionSequence#to_binary(extra_data = nil) -> String (12213.0)

バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

...て返します。
Ruby
VM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。

引数の extra_data はバイナリデータと共に保存されます。
Ruby
VM::InstructionSequence.load_from_binary_extra_data メソッ...
...ry で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。

//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extr...
...合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x00\x00\x00\x01
# \x00\x00\x00\x00\x0...

Date#next_year(n = 1) -> Date (12207.0)

n 年後を返します。

...します。

//emlist[例][ruby]{
r
equire 'date'
Date.new(2001,2,3).next_year #=> #<Date: 2002-02-03 ...>
Date.new(2008,2,29).next_year #=> #<Date: 2009-02-28 ...>
Date.new(2008,2,29).next_year(4) #=> #<Date: 2012-02-29 ...>
//}

Date#>> も参照してください。

@param n 年数...

IO#external_encoding -> Encoding | nil (12207.0)

IO の外部エンコーディングを返します。 外部エンコーディングが指定されていない場合は nil を返します。 ただし読み込み専用モードの場合は Encoding.default_external になります。

...ディングが指定されていない場合は nil を返します。
ただし読み込み専用モードの場合は Encoding.default_external になります。

//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") { |f| p f.external_encoding } # => #<Encoding:UTF-8>
//}...

絞り込み条件を変える

REXML::DocType#external_id -> String | nil (12207.0)

DTD が外部サブセットを用いている場合は "SYSTEM", "PUBLIC" の いずれかの文字列を返します。

...//emlist[][ruby]{
r
equire 'rexml/document'
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
EOS
doctype.name # => "html"
doctype.external_id # => "PUBLIC"

doctype = REXML::Document...
....new(<<EOS).doctype
<!DOCTYPE books [
<!ELEMENT books (book+)>
<!ELEMENT book (title,author)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (#PCDATA)>
]>
EOS
doctype.name # => "books"
doctype.external_id # => nil
//}...

REXML::Element#get_text(path = nil) -> REXML::Text | nil (9307.0)

先頭のテキスト子ノードを返します。

...先頭のテキスト子ノードを返します。

r
aw モードの設定は無視され、常に正規化されたテキストを返します。
R
EXML::Text#value も参照してください。

path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字...
...を返します。

@param path XPath文字列
@see REXML::Element#text

//emlist[][ruby]{
r
equire 'rexml/document'
doc = REXML::Document.new "<p>some text <b>this is bold!</b> more text</p>"
# doc.root (<p> ... </p>) は2つのテキストノード("some text " と " more text"
# を持っている...
...が、前者を返す
doc.root.get_text.value # => "some text "
//}...

URI::MailTo#to_mailtext -> String (9237.0)

URI オブジェクトからメールテキスト文字列を生成します。

...URI オブジェクトからメールテキスト文字列を生成します。

例:
r
equire 'uri'
p mailto = URI.parse("mailto:ruby-list@ruby-lang.org?subject=subscribe&cc=myaddr")
print mailto.to_mailtext

=> #<URI::MailTo:0x20104a0e URL:mailto:ruby-list@ruby-lang.org?subject=subscribe&...
...cc=myaddr>
To: ruby-list@ruby-lang.org
Subject: subscribe
Cc: myaddr...

String#next -> String (9231.0)

self の「次の」文字列を返します。

...して計算されます。

//emlist[][ruby]{
p "aa".succ # => "ab"
p "88".succ.succ # => "90"
//}

"99" → "100", "AZZ" → "BAA" のような繰り上げも行われます。
このとき負符号などは考慮されません。

//emlist[][ruby]{
p "99".succ # => "100"
p "ZZ".succ...
...なり、残りは保存されます。

//emlist[][ruby]{
p "1.9.9".succ # => # "2.0.0"
//}

逆に self がアルファベットや数字をまったく含まない場合は、
単純に文字コードを 1 増やします。

//emlist[][ruby]{
p ".".succ # => "/"
//}

さらに、self が空...
...ます。

なお、succ と逆の動作をするメソッドはありません。
また、succ という名前の由来は successor です。


//emlist[例][ruby]{
p "aa".succ # => "ab"

# 繰り上がり
p "99".succ # => "100"
p "a9".succ # => "b0"
p "Az".succ # => "Ba"
p "zz".succ #...
<< 1 2 3 ... > >>