44件ヒット
[1-44件を表示]
(0.013秒)
別のキーワード
種類
- インスタンスメソッド (33)
- 文書 (11)
ライブラリ
- date (11)
-
irb
/ cmd / help (11) -
rexml
/ document (11)
クラス
- Date (11)
-
IRB
:: ExtendCommand :: Help (11) -
REXML
:: Element (11)
キーワード
-
each
_ element _ with _ text (11) - execute (11)
-
next
_ year (11) -
ruby 1
. 6 feature (11)
検索結果
先頭4件
-
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (6242.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...テキストを子ノードとして
持つすべての子要素を引数としてブロックを呼び出します。
text を指定すると、テキストの内容が text であるもののみを対象とします。
maxを指定すると、対象となる子要素の先頭 max 個のみが対......aram text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e}
# >> <b>......... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
Date
# next _ year(n = 1) -> Date (6106.0) -
n 年後を返します。
...ます。
self >> (n * 12) に相当します。
//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#>> も参照し... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (3006.0) -
RI から Ruby のドキュメントを参照します。
...ま
す。
irb(main):001:0> help
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(patt... -
ruby 1
. 6 feature (18.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...Fixnum#>>, <<
負の数に対して右シフトすると 0 になることがありました。
((<ruby-bugs-ja:PR#247>))
負の数を引数にした左シフト(つまり右シフト)も同様におかしな挙動をして
いました。((<ruby-bugs-ja:PR#248>))
p(-1 >> 31)......のようなスクリプトでTEXT_PLAINが"text/plain; charset=iso-8859-1"
のように書き換えられていました。
((<ruby-dev:14716>))
require 'cgi'
TEXT_PLAIN = "text/plain"
cgi = CGI.new
print cgi.header("type" => TEXT_PLAIN,......=> "iso-8859-1")
printf("TEXT_PLAIN: %s\n", TEXT_PLAIN)
=> ruby 1.6.4 (2001-06-04) [i586-linux]
Content-Type: text/plain; charset=iso-8859-1
^M
TEXT_PLAIN: text/plain; charset=iso-8859-1
TEXT_PLAIN: text/plain
=> ruby 1.6.5 (2001...