別のキーワード
ライブラリ
- ビルトイン (891)
-
cgi
/ core (12) - csv (48)
- json (240)
-
json
/ add / bigdecimal (12) -
json
/ add / complex (12) -
json
/ add / date (12) -
json
/ add / date _ time (12) -
json
/ add / exception (12) -
json
/ add / range (12) -
json
/ add / rational (12) -
json
/ add / regexp (12) -
json
/ add / struct (12) -
json
/ add / time (12) - mkmf (12)
-
net
/ http (108) - open-uri (24)
- optparse (456)
- pathname (12)
- rake (60)
-
rexml
/ document (48) -
rubygems
/ specification (24) -
rubygems
/ version (24) - socket (24)
- strscan (12)
クラス
- Addrinfo (12)
- Array (12)
- BigDecimal (12)
- Binding (7)
- CGI (12)
-
CSV
:: Table (24) - Class (12)
- Complex (12)
- Date (12)
- DateTime (12)
-
Encoding
:: Converter (84) -
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) - Exception (80)
-
Gem
:: Specification (24) -
Gem
:: Version (24) -
JSON
:: Parser (12) -
JSON
:: State (108) - MatchData (2)
- Method (12)
- Module (156)
-
Net
:: HTTPResponse (96) - Object (84)
- OptionParser (408)
- Pathname (12)
- Proc (12)
-
REXML
:: Document (24) -
REXML
:: Instruction (24) -
Rake
:: Application (36) -
Rake
:: InvocationChain (12) - Range (12)
- Rational (36)
- Regexp (12)
-
RubyVM
:: InstructionSequence (94) - SignalException (12)
- Socket (12)
- String (204)
- StringScanner (12)
- Struct (12)
-
Thread
:: Backtrace :: Location (72) - Time (36)
- UnboundMethod (24)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) - Kernel (12)
-
Net
:: HTTPHeader (12) -
OpenURI
:: Meta (24) -
OptionParser
:: Arguable (48) -
Rake
:: TaskManager (12)
キーワード
- === (12)
-
absolute
_ path (24) -
arg
_ config (12) -
array
_ nl (12) - autoload (12)
- autoload? (12)
- backtrace (12)
-
base
_ label (24) - binread (12)
- body (12)
- byteindex (3)
- canonname (12)
- capitalize (9)
- capitalize! (9)
- clone (24)
- code (12)
- concat (33)
- connect (12)
-
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - content (12)
-
content
_ encoding (12) -
content
_ type (24) - convert (12)
- deconstruct (2)
-
default
_ argv (12) -
define
_ singleton _ method (24) -
deprecate
_ constant (12) - disasm (12)
- disassemble (12)
- downcase (9)
- downcase! (9)
- dup (12)
- encode (36)
- encode! (24)
- entity (12)
- environment (12)
-
error
_ bytes (12) -
error
_ char (12) - finish (12)
- header (12)
- help (12)
-
http
_ version (12) - indent (12)
- indent= (12)
-
insert
_ output (12) - inspect (48)
-
json
_ creatable? (12) - label (24)
-
last
_ description (12) -
module
_ function (36) - msg (12)
- name (12)
-
object
_ nl (12) -
object
_ nl= (12) - order (48)
- order! (48)
-
original
_ dir (12) - parse (24)
- parse! (24)
-
parse
_ csv (12) - partition (12)
- path (24)
- permute (24)
- permute! (24)
-
private
_ constant (12) -
program
_ name (12) -
public
_ constant (12) - putback (24)
- rakefile (12)
-
read
_ body (24) - release (12)
-
remove
_ const (12) - replacement (12)
- replacement= (12)
- rpartition (12)
-
rubygems
_ version (12) -
set
_ backtrace (12) - signm (12)
-
singleton
_ class (12) -
singleton
_ method (12) - source (12)
-
source
_ location (43) - space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) -
stand
_ alone? (12) - strftime (12)
-
summary
_ indent (12) - swapcase (9)
- swapcase! (9)
- target (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ csv (24) -
to
_ json (228) -
to
_ r (12) -
to
_ ruby (12) -
to
_ s (84) - upcase (9)
- upcase! (9)
- ver (12)
- version (24)
- zone (12)
検索結果
先頭5件
-
String
# partition(sep) -> [String , String , String] (36628.0) -
セパレータ sep が最初に登場する部分で self を 3 つに分割し、 [最初のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".partition("x") # => ["a", "x", "axa"]
p "aaaaa".partition("x") # => ["aaaaa", "", ""]
p "aaaaa".partition("") # => ["", "", "aaaaa"]
//}
@see String#rpartition, String#split... -
String
# rpartition(sep) -> [String , String , String] (36628.0) -
セパレータ sep が最後に登場する部分で self を 3 つに分割し、 [最後のセパレータより前の部分, セパレータ, それ以降の部分] の 3 要素の配列を返します。
...と第 2 要素が空文字列になります。
@param sep セパレータを表す文字列か正規表現を指定します。
//emlist[例][ruby]{
p "axaxa".rpartition("x") # => ["axa", "x", "a"]
p "aaaaa".rpartition("x") # => ["", "", "aaaaa"]
//}
@see String#partition, String#split... -
String
# concat(other) -> self (30221.0) -
self に文字列 other を破壊的に連結します。 other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
...other を破壊的に連結します。
other が 整数である場合は other.chr(self.encoding) 相当の文字を末尾に追加します。
self を返します。
@param other 文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "string"
str.concat "XXX"
p str # => "str......ingXXX"
str << "YYY"
p str # => "stringXXXYYY"
str << 65 # 文字AのASCIIコード
p str # => "stringXXXYYYA"
//}... -
String
# concat(*arguments) -> self (30216.0) -
self に複数の文字列を破壊的に連結します。
...は Integer#chr の結果に相当する文字を末尾に追加します。追加する文字のエンコーディングは self.encoding です。
self を返します。
@param arguments 複数の文字列もしくは 0 以上の整数
//emlist[例][ruby]{
str = "foo"
str.concat
p str # =>......"foo"
str = "foo"
str.concat "bar", "baz"
p str # => "foobarbaz"
str = "foo"
str.concat("!", 33, 33)
p str # => "foo!!!"
//}... -
String
# capitalize(*options) -> String (27344.0) -
文字列先頭の文字を大文字に、残りを小文字に変更した文字列を返します。
...ptions オプションの詳細は String#downcase を参照してください。
//emlist[例][ruby]{
p "foobar--".capitalize # => "Foobar--"
p "fooBAR--".capitalize # => "Foobar--"
p "FOOBAR--".capitalize # => "Foobar--"
//}
@see String#capitalize!, String#upcase,
String#downcase, Str... -
String
# byteindex(pattern , offset = 0) -> Integer | nil (27331.0) -
文字列の offset から右に向かって pattern を検索し、 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...文字列の offset から右に向かって pattern を検索し、
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列または正規表現で指定......します。
offset が負の場合、文字列の末尾から数えた位置から探索します。
@param pattern 探索する部分文字列または正規表現
@param offset 探索を開始するバイト単位のオフセット
@raise IndexError オフセットが文字列の境界......emlist[例][ruby]{
'foo'.byteindex('f') # => 0
'foo'.byteindex('o') # => 1
'foo'.byteindex('oo') # => 1
'foo'.byteindex('ooo') # => nil
'foo'.byteindex(/f/) # => 0
'foo'.byteindex(/o/) # => 1
'foo'.byteindex(/oo/) # => 1
'foo'.byteindex(/ooo/) # => nil
'foo'.byteindex('o', 1) # => 1
'foo'.byteinde... -
String
# capitalize!(*options) -> self | nil (27243.0) -
文字列先頭の文字を大文字に、残りを小文字に破壊的に変更します。
...options オプションの詳細は String#downcase を参照してください。
@return capitalize! は self を変更して返しますが、
変更が起こらなかった場合は nil を返します。
//emlist[例][ruby]{
str = "foobar"
str.capitalize!
p str # => "Foobar"
str =......"fooBAR"
str.capitalize!
p str # => "Foobar"
//}
@see String#capitalize, String#upcase!,
String#downcase!, String#swapcase!... -
String
# to _ r -> Rational (27237.0) -
自身を有理数(Rational)に変換した結果を返します。
...自身を有理数(Rational)に変換した結果を返します。
Kernel.#Rational に文字列を指定した時のように、以下のいずれかの形
式で指定します。
* "1/3" のような分数の形式
* "0.3" のような10進数の形式
* "0.3E0" のような x.xEn の形......スコアで繋いだ形式
//emlist[例][ruby]{
' 2 '.to_r # => (2/1)
'1/3'.to_r # => (1/3)
'-9.2'.to_r # => (-46/5)
'-9.2E2'.to_r # => (-920/1)
'1_234_567'.to_r # => (1234567/1)
'1_234/5_678'.to_r # => (617/2839)
//}
Kernel.#Rational に文字列を指定した時......//emlist[][ruby]{
'21 june 09'.to_r # => (21/1)
'21/06/09'.to_r # => (7/2) # 21/6 を約分して 7/2。
//}
変換できないような文字列を指定した場合は 0/1 を返します。
//emlist[][ruby]{
'foo'.to_r # => (0/1)
''.to_r # => (0/1)
'bwv 1079'.to_r #... -
Gem
:: Specification # rubygems _ version -> String (24502.0) -
この Gem パッケージを作成した RubyGems のバージョンを返します。
...この Gem パッケージを作成した RubyGems のバージョンを返します。... -
OptionParser
# on(long , klass = String , desc = "") {|v| . . . } -> self (24489.0) -
オプションを取り扱うためのブロックを自身に登録します。 ブロックはコマンドラインのパース時に、オプションが指定されていれば呼ばれます。
...な引数クラス」を参照して下さい。
OptionParser.accept や OptionParser#accept によって、受け付け
るクラスを増やすことができます。登録されていないクラスが指定された
場合、例外 ArgumentError を投げます。
また、登録されたクラ......ptionParser::InvalidArgument を投げます。
オプションの引数は accept で登録したブロックで klass のインスタンス
に変換されてから、ブロックに渡されます。
opts.on("-w", "--width N", Integer){|w|
p w.class #=> Integer
}
# ruby command --widt......h=32
opts.on("-o", "--overwrite VALUE", TrueClass){|boolean| ...}
# ruby command --overwrite yes
@param short ショートオプションを表す文字列を指定します。
@param long ロングオプションを表す文字列を指定します。
@param klass オプションの引数...