48件ヒット
[1-48件を表示]
(0.011秒)
種類
- インスタンスメソッド (24)
- ライブラリ (12)
- クラス (12)
クラス
- Date (24)
キーワード
- Numeric (12)
-
next
_ year (12) -
rexml
/ parsers / pullparser (12)
検索結果
-
Date
# >>(n) -> Date (18161.0) -
self から n ヶ月後の日付オブジェクトを返します。 n は数値でなければなりません。
...Date.new(2001,2,3) >> 1 #=> #<Date: 2001-03-03 ...>
Date.new(2001,2,3) >> -2 #=> #<Date: 2000-12-03 ...>
//}
対応する月に同じ日が存在しない時は、代わりにその月の末日が使われます。
//emlist[][ruby]{
require 'date'
Date.new(2001,1,28) >> 1 #=> #<Date: 20......(2001,1,31) >> 1 #=> #<Date: 2001-02-28 ...>
//}
このことは以下のように、もしかすると予期しない振る舞いをするかもしれません。
//emlist[][ruby]{
require 'date'
Date.new(2001,1,31) >> 2 #=> #<Date: 2001-03-31 ...>
Date.new(2001,1,31) >> 1 >> 1 #=> #......<Date: 2001-03-28 ...>
Date.new(2001,1,31) >> 1 >> -1 #=> #<Date: 2001-01-28 ...>
//}
Date#next_month も参照してください。
@param n 月数... -
Date
# next _ year(n = 1) -> Date (6125.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#>> も参照し... -
rexml
/ parsers / pullparser (150.0) -
プル方式の XML パーサ。
...s_next?
p parser.pull
end
# >> xmldecl: ["1.0", "UTF-8", nil]
# >> text: ["\n", "\n"]
# >> processing_instruction: ["xml-stylesheet", " type=\"text/css\" href=\"style.css\""]
# >> text: ["\n", "\n"]
# >> start_doctype: ["root", "SYSTEM", "foo", nil]
# >> elementdecl: ["<!ELEMENT root (a+)"]
# >> e......lementdecl: ["<!ELEMENT a"]
# >> entitydecl: ["bar", "barbarbarbar"]
# >> attlistdecl: ["a", {"att"=>nil, "xyz"=>"foobar"}, " \n <!ATTLIST a att CDATA #REQUIRED xyz CDATA \"foobar\">"]
# >> notationdecl: ["foobar", "SYSTEM", nil, "http://example.org/foobar.dtd"]
# >> entitydecl: ["HTMLsymbol", "PUB......html-symbol.ent", "%"]
# >> externalentity: ["%HTMLsymbol;"]
# >> end_doctype: []
# >> text: ["\n", "\n"]
# >> start_element: ["root", {"xmlns:foo"=>"http://example.org/foo", "xmlns:bar"=>"http://example.org/bar"}]
# >> cdata: ["cdata is here"]
# >> text: ["\n ", "\n "]
# >> start_element: ["a", {... -
Numeric (18.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...o o - -
>= | - - o o o - -
>> | - - o o - - -
[] | - - o......o o - -
nan? | - - - - o - -
next | - o - - - - -
nonzero? | o - -......> | - o o - -
>= | - o o - -
>> | - o - - -
[] | - o - - -......o - -
negative? | o - o o -
next | - o - - -
next_float | - - o - -
nonzero? | o...