490件ヒット
[1-100件を表示]
(0.145秒)
別のキーワード
ライブラリ
- ビルトイン (130)
-
cgi
/ core (12) - date (12)
-
irb
/ cmd / help (12) -
irb
/ cmd / load (36) -
irb
/ context (48) - json (12)
- mkmf (12)
- pathname (12)
- prime (24)
- rake (24)
-
rexml
/ document (120) -
rubygems
/ gem _ path _ searcher (12) - uri (24)
クラス
-
ARGF
. class (12) - CGI (12)
- Date (12)
- Enumerator (24)
-
Gem
:: GemPathSearcher (12) - IO (12)
-
IRB
:: Context (48) -
IRB
:: ExtendCommand :: Help (12) -
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Require (12) -
IRB
:: ExtendCommand :: Source (12) - Integer (24)
- Pathname (12)
-
Prime
:: EratosthenesGenerator (24) -
REXML
:: Child (12) -
REXML
:: DocType (12) -
REXML
:: Element (60) -
REXML
:: Text (36) -
Rake
:: Application (12) -
Rake
:: FileList (12) -
RubyVM
:: InstructionSequence (10) - String (48)
-
URI
:: MailTo (24)
モジュール
キーワード
-
add
_ loader (12) -
create
_ makefile (12) -
each
_ element _ with _ text (12) - execute (48)
-
external
_ encoding (12) -
external
_ id (12) -
get
_ text (12) - header (12)
-
inplace
_ mode= (12) -
lib
_ dirs _ for (12) - next (48)
- next! (12)
-
next
_ element (12) -
next
_ sibling= (12) -
next
_ values (12) -
next
_ year (12) -
prompt
_ mode (12) -
prompt
_ mode= (12) -
sub
_ ext (12) - succ (36)
- succ! (12)
- text (12)
- text= (12)
-
to
_ binary (10) -
to
_ json (12) -
to
_ mailtext (12) -
to
_ rfc822text (12) -
to
_ s (12) -
use
_ readline (12) -
use
_ readline? (12) - value (12)
- value= (12)
検索結果
先頭5件
-
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 オブジェクトからメールテキスト文字列を生成します。
例:
require '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オブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::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]{
require '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]{
require '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) -
先頭のテキスト子ノードを返します。
...先頭のテキスト子ノードを返します。
raw モードの設定は無視され、常に正規化されたテキストを返します。
REXML::Text#value も参照してください。
path を渡した場合は、その XPath 文字列で指定される
テキストノードの文字......を返します。
@param path XPath文字列
@see REXML::Element#text
//emlist[][ruby]{
require '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 オブジェクトからメールテキスト文字列を生成します。
例:
require '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 #...