るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.011秒)
トップページ > バージョン:2.1.0[x] > クエリ:~[x] > 種類:クラス[x]

別のキーワード

  1. _builtin ~
  2. ipaddr ~
  3. regexp ~
  4. integer ~
  5. bignum ~

ライブラリ

キーワード

検索結果

RDoc::Markup (58.0)

RDoc 形式のドキュメントを目的の形式に変換するためのクラスです。

...フォーマットを行うようにパーサを拡張する事もできます。


例:

require 'rdoc/markup'
require 'rdoc/markup/to_html'

class
WikiHtml < RDoc::Markup::ToHtml
# WikiWord のフォントを赤く表示。
def handle_special_WIKIWORD(special)
"<font color=red>...

Numeric (22.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

...d
//}

また、任意桁の切上げ、切捨て、四捨五入を行うメソッドは以下のように
定義できます。

//emlist[][ruby]{
class
Numeric
def roundup(d=0)
x = 10**d
if self > 0
self.quo(x).ceil * x
else
self.quo(x).floor * x
end
end

def roun...