1153件ヒット
[101-200件を表示]
(0.096秒)
別のキーワード
ライブラリ
クラス
- Array (179)
- BasicObject (24)
-
Benchmark
:: Tms (12) -
CSV
:: Table (168) - DBM (24)
- Delegator (24)
-
Digest
:: Base (24) - Fiber (18)
- GDBM (24)
- Hash (166)
- Method (14)
- Module (12)
- Object (24)
-
OpenSSL
:: BN (60) - OptionParser (36)
- Proc (14)
-
Rake
:: FileList (24) - SDBM (24)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (168)
-
Zlib
:: GzipReader (24)
モジュール
キーワード
- != (24)
- !~ (12)
- << (14)
- === (12)
- >> (14)
- [] (36)
- []= (12)
- add! (12)
-
by
_ col! (12) -
by
_ col _ or _ row (12) -
by
_ col _ or _ row! (12) -
by
_ row! (12) -
clear
_ bit! (12) - compact (9)
- compact! (9)
-
delete
_ if (60) - digest! (12)
- each (24)
- filter! (28)
- glob (18)
- gsub! (60)
- hexdigest! (12)
-
instance
_ method (12) -
keep
_ if (24) - lineno (12)
- lineno= (12)
- lshift! (12)
-
mask
_ bits! (12) - merge! (24)
- mode (12)
- next! (12)
- order! (48)
- pack (21)
- parse! (12)
- permute! (24)
- raise (18)
- reject! (36)
- rotate! (12)
- rshift! (12)
- scrub! (36)
- select! (48)
-
set
_ bit! (12) - slice! (48)
- sort (24)
- sort! (24)
-
sort
_ by! (24) - sub! (48)
- succ! (12)
-
transform
_ keys! (20) -
transform
_ values! (18) - unpack (12)
- update (24)
-
values
_ at (12)
検索結果
先頭5件
-
OpenSSL
:: BN # mask _ bits!(n) -> self (12219.0) -
自身を下位 n ビットでマスクし、破壊的に変更します。
...場合は例外 OpenSSL::BNError
が発生します。
//emlist[][ruby]{
require 'openssl'
bn = 0b1111_1111.to_bn
bn.mask_bits!(8)
p "%b" % bn # => "11111111"
bn.mask_bits!(3)
p "%b" % bn # => "111"
//}
@param n マスクするビット数
@raise OpenSSL::BNError 計算時エラ... -
Rake
:: FileList # sub!(pattern , replace) -> self (12219.0) -
自身に含まれるファイルリストのそれぞれのエントリに対して String#sub を実行します。 自身を破壊的に変更します。
...に対して String#sub を実行します。
自身を破壊的に変更します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList['a.c', 'b.c']
file_list.sub!(/\.c$/, '.o') # => ['a.o', 'b.o']
file_list......# => ['a.o', 'b.o']
end
//}... -
CSV
:: Table # by _ col _ or _ row! -> self (12214.0) -
自身をミックスモードに変更します。
...ist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2]).by_col!
table # => #<CSV::Table mode:col row_count:3>
table.by_col_or_row!
table......# => #<CSV::Table mode:col_or_row row_count:3>
//}... -
String
# sub!(pattern , hash) -> String (12210.0) -
文字列中の pattern にマッチした部分をキーにして hash を引いた値で破壊的に置き換えます。
文字列中の pattern にマッチした部分をキーにして hash を引いた値で破壊的に置き換えます。
@param pattern 置き換える文字列のパターン
@param hash 置き換える文字列を与えるハッシュ
@return 置換した場合は self、置換しなかった場合は nil -
Array
# sort _ by! -> Enumerator (12209.0) -
sort_by の破壊的バージョンです。
...sort_by の破壊的バージョンです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
fruits = %w{apple pear fig}
fruits.sort_by! { |word| word.length }
fruits # => ["fig", "pear", "apple"]
//}
@see Enumerable#sort_by... -
Array
# sort _ by! {|item| . . . } -> self (12209.0) -
sort_by の破壊的バージョンです。
...sort_by の破壊的バージョンです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
fruits = %w{apple pear fig}
fruits.sort_by! { |word| word.length }
fruits # => ["fig", "pear", "apple"]
//}
@see Enumerable#sort_by... -
CSV
:: Table # by _ col! -> self (12208.0) -
自身をカラムモードに変更します。
...きます。
//emlist[例][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table.by_col!
table[0] # => ["row1_1", "row2_1"]
table[1] # => ["row1_2", "row2_2... -
CSV
:: Table # by _ row! -> self (12208.0) -
自身をロウモードに変更します。
...][ruby]{
require "csv"
row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
table = CSV::Table.new([row1, row2])
table # => #<CSV::Table mode:col_or_row row_count:3>
table.by_row!
table # => #<CSV::Table......mode:row row_count:3>
table[0] # => #<CSV::Row "header1":"row1_1" "header2":"row1_2">
table[1] # => #<CSV::Row "header1":"row2_1" "header2":"row2_2">
//}... -
String
# scrub! -> String (12208.0) -
self が不正なバイト列を含む場合に別の文字列に置き換えます。常に self を返します。
...文字列を指定します。省略した場合
は self の文字エンコーディングが Encoding::UTF_16BE,
Encoding::UTF_16LE, Encoding::UTF_32BE,
Encoding::UTF_32LE, Encoding::UTF_8 のいずれか
の場合は "\uFFFD" を表す文字で、......ロックの戻り値で置き換えられます。
//emlist[例][ruby]{
"abc\u3042\x81".scrub! # => "abc\u3042\uFFFD"
"abc\u3042\x81".scrub!("*") # => "abc\u3042*"
"abc\u3042\xE3\x80".scrub!{|bytes| '<'+bytes.unpack('H*')[0]+'>' } # => "abc\u3042<e380>"
//}
@see String#scrub...