2623件ヒット
[1-100件を表示]
(0.142秒)
ライブラリ
- ビルトイン (1017)
- benchmark (12)
- bigdecimal (24)
-
bigdecimal
/ util (12) - csv (48)
- date (12)
- digest (24)
- erb (12)
- fiddle (72)
- ipaddr (24)
-
irb
/ context (36) - json (12)
- matrix (24)
- openssl (384)
- optparse (48)
- ostruct (24)
- pathname (108)
- rake (84)
- resolv (36)
- rexml (12)
-
rexml
/ document (180) -
rubygems
/ package / tar _ header (12) -
rubygems
/ platform (12) -
rubygems
/ requirement (12) -
rubygems
/ version (24) - scanf (6)
- set (10)
-
shell
/ filter (6) - socket (48)
- stringio (24)
- uri (36)
-
webrick
/ httprequest (12) -
webrick
/ httpresponse (36) -
webrick
/ httputils (12) -
webrick
/ httpversion (12) - win32ole (132)
クラス
-
ARGF
. class (24) - Addrinfo (24)
- Array (36)
-
Benchmark
:: Tms (12) - BigDecimal (36)
- Bignum (6)
-
CGI
:: Cookie (12) -
CSV
:: Row (24) -
CSV
:: Table (24) - Complex (12)
- Data (6)
- Date (12)
-
Digest
:: Base (24) - ERB (12)
- Encoding (24)
- Exception (24)
- FalseClass (24)
-
Fiddle
:: Pointer (72) - Fixnum (6)
- Float (24)
-
Gem
:: Package :: TarHeader (12) -
Gem
:: Platform (12) -
Gem
:: Requirement (12) -
Gem
:: Version (24) - Hash (24)
- IO (12)
- IPAddr (24)
-
IRB
:: Context (36) - Integer (24)
- MatchData (12)
- Matrix (12)
- Method (24)
- Module (36)
- NameError (12)
- NilClass (12)
- Object (64)
-
OpenSSL
:: BN (12) -
OpenSSL
:: Config (12) -
OpenSSL
:: HMAC (36) -
OpenSSL
:: Netscape :: SPKI (24) -
OpenSSL
:: PKCS7 (24) -
OpenSSL
:: PKey :: DH (36) -
OpenSSL
:: PKey :: DSA (72) -
OpenSSL
:: PKey :: RSA (72) -
OpenSSL
:: X509 :: CRL (24) -
OpenSSL
:: X509 :: Certificate (24) -
OpenSSL
:: X509 :: Extension (12) -
OpenSSL
:: X509 :: Name (12) -
OpenSSL
:: X509 :: Request (24) - OpenStruct (24)
- OptionParser (24)
-
OptionParser
:: ParseError (24) - Pathname (108)
- Proc (24)
-
Process
:: Status (12) -
REXML
:: Attribute (24) -
REXML
:: CData (24) -
REXML
:: Comment (24) -
REXML
:: Declaration (12) -
REXML
:: DocType (12) -
REXML
:: Element (12) -
REXML
:: Entity (12) -
REXML
:: ExternalEntity (12) -
REXML
:: NotationDecl (12) -
REXML
:: ParseException (12) -
REXML
:: Text (24) -
Rake
:: EarlyTime (12) -
Rake
:: FileList (12) -
Rake
:: InvocationChain (12) -
Rake
:: InvocationChain :: EmptyInvocationChain (12) -
Rake
:: Task (12) -
Rake
:: TaskArguments (24) - Range (24)
- Rational (24)
- Regexp (24)
-
Resolv
:: DNS :: Name (12) -
Resolv
:: IPv4 (12) -
Resolv
:: IPv6 (12) -
Scanf
:: FormatString (6) - Set (16)
-
Shell
:: Filter (6) -
Socket
:: Option (24) - String (108)
- StringIO (24)
- Struct (24)
- Symbol (260)
- Thread (16)
-
Thread
:: Backtrace :: Location (24) - Time (18)
- TrueClass (12)
-
URI
:: Generic (36) - UnboundMethod (24)
- UncaughtThrowError (11)
- Vector (12)
-
WEBrick
:: Cookie (12) -
WEBrick
:: HTTPRequest (12) -
WEBrick
:: HTTPResponse (36) -
WEBrick
:: HTTPUtils :: FormData (12) -
WEBrick
:: HTTPVersion (12) -
WIN32OLE
_ METHOD (24) -
WIN32OLE
_ PARAM (24) -
WIN32OLE
_ TYPE (36) -
WIN32OLE
_ TYPELIB (24) -
WIN32OLE
_ VARIABLE (24)
モジュール
キーワード
- % (12)
- << (12)
- =~ (12)
- [] (84)
-
_ _ to _ s _ _ (12) -
add
_ element (12) - binread (12)
- binwrite (12)
- capitalize (12)
-
content
_ length (12) -
content
_ length= (12) - data (12)
-
define
_ singleton _ method (24) - downcase (9)
-
end
_ with? (6) - entities (12)
- export (60)
- extname (12)
- ftype (12)
- help (12)
- hex (12)
- hexdigest (24)
- id2name (12)
- inspect (271)
- intern (12)
- join (12)
- length (12)
- match (12)
- name (89)
- normalize (12)
- normalize! (12)
- oct (12)
- read (12)
- readlines (12)
- size (12)
- slice (60)
- src (12)
-
start
_ with? (6) - swapcase (9)
- syswrite (12)
-
to
_ csv (24) -
to
_ digits (12) -
to
_ f (12) -
to
_ i (12) -
to
_ json (12) -
to
_ path (12) -
to
_ pem (120) -
to
_ sockaddr (12) -
to
_ str (48) -
to
_ string (24) -
to
_ sym (24) - upcase (9)
- value (24)
- version (12)
- write (24)
-
yield
_ self (16)
検索結果
先頭5件
-
String
# to _ s -> String (30328.0) -
self を返します。
...mlist[例][ruby]{
p "str".to_s # => "str"
p "str".to_str # => "str"
//}
このメソッドは、文字列を他のクラスのインスタンスと混ぜて処理したいときに有効です。
例えば返り値が文字列か nil であるメソッド some_method があるとき、
to_s......メソッドを使うと以下のように統一的に処理できます。
//emlist[例][ruby]{
# some_method(5).downcase だと返り値が nil のときに
# エラーになるので to_s をはさむ
p some_method(5).to_s.downcase
//}... -
Rake
:: InvocationChain :: EmptyInvocationChain # to _ s -> String (30303.0) -
'TOP' という文字列を返します。
'TOP' という文字列を返します。 -
REXML
:: Comment # string -> String (24405.0) -
コメント文字列を返します。
コメント文字列を返します。 -
Rake
:: InvocationChain # to _ s -> String (24309.0) -
トップレベルのタスクから自身までの依存関係を文字列として返します。
...の依存関係を文字列として返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
invocation_chain= Rake::InvocationChain.new("task_a", Rake::InvocationChain::EMPTY)
invocation_chain.to_s # => "TOP => task_a"
end
//}... -
Scanf
:: FormatString # to _ s (24102.0) -
@todo
@todo -
BigDecimal
# to _ s -> String (21371.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
... Integer または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emli......st[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.123456......きます。負の場合は常に '-' が付きます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.123456").to_s(" 3") # => " 0.123 456e0"
BigDecimal("0.123456").to_s("+3") # => "+0.123 456e0"
BigDecimal("-0.123456").to_s("3") # => "-0.123 456e0"
//}
さらに文字列の最後に指数... -
BigDecimal
# to _ s(n) -> String (21371.0) -
self を文字列に変換します (デフォルトは "0.xxxxxen" の形になります)。
... Integer または String で指定します。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1.23456").to_s # ==> "0.123456e1"
//}
引数 n に正の整数が指定されたときは、小数点で分けられる左右部分を、
それぞれ n 桁毎に空白で区切ります。
//emli......st[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s(10) # => "0.1234567890 123456789e0"
//}
引数 n に正の整数を表す文字列を指定することもできます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.1234567890123456789").to_s("10") # => "0.123456......きます。負の場合は常に '-' が付きます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("0.123456").to_s(" 3") # => " 0.123 456e0"
BigDecimal("0.123456").to_s("+3") # => "+0.123 456e0"
BigDecimal("-0.123456").to_s("3") # => "-0.123 456e0"
//}
さらに文字列の最後に指数... -
Integer
# to _ s(base=10) -> String (21328.0) -
整数を 10 進文字列表現に変換します。
...文字列表
現に変換します。
//emlist[][ruby]{
p 10.to_s(2) # => "1010"
p 10.to_s(8) # => "12"
p 10.to_s(16) # => "a"
p 35.to_s(36) # => "z"
//}
@return 数値の文字列表現
@param base 基数となる 2 - 36 の数値。
@raise ArgumentError base に 2 - 36 以外の数... -
Rational
# to _ s -> String (21327.0) -
自身を人間が読みやすい形の文字列表現にして返します。
..."-17/7" のように10進数の表記を返します。
@return 有理数の表記にした文字列を返します。
//emlist[例][ruby]{
Rational(3, 4).to_s # => "3/4"
Rational(8).to_s # => "8/1"
Rational(-8, 6).to_s # => "-4/3"
Rational(0.5).to_s # => "1/2"
//}
@see Rational#inspect...