別のキーワード
ライブラリ
- ビルトイン (2298)
- abbrev (12)
- bigdecimal (12)
- csv (39)
- date (28)
-
fiddle
/ import (12) - json (12)
-
json
/ add / date (12) -
json
/ add / date _ time (12) - logger (48)
- matrix (60)
- mkmf (12)
-
net
/ http (228) - openssl (24)
- optparse (48)
- pathname (72)
- pp (24)
- psych (80)
- rake (60)
-
rexml
/ document (72) -
rexml
/ streamlistener (12) -
rubygems
/ requirement (36) -
rubygems
/ specification (36) - socket (24)
- strscan (24)
- tsort (23)
- win32ole (36)
クラス
- Addrinfo (24)
- Array (1020)
- BigDecimal (12)
- Binding (12)
-
CSV
:: Row (3) -
CSV
:: Table (24) - Data (3)
- Date (38)
- DateTime (14)
-
Encoding
:: Converter (60) - Enumerator (72)
-
Enumerator
:: Lazy (24) -
Gem
:: Requirement (36) -
Gem
:: Specification (36) - Hash (222)
- IO (12)
- Integer (8)
- Logger (48)
- MatchData (24)
- Matrix (24)
- Method (34)
- Module (180)
-
Net
:: HTTP (24) -
Net
:: HTTPGenericRequest (24) -
Net
:: HTTPResponse (24) - Numeric (74)
- Object (96)
-
OpenSSL
:: BN (24) - OptionParser (48)
- Pathname (72)
- Proc (24)
-
Psych
:: ScalarScanner (12) -
Psych
:: Stream (24) -
Psych
:: Visitors :: YAMLTree (12) -
REXML
:: DocType (36) -
REXML
:: Element (36) -
Rake
:: FileList (24) -
Rake
:: TaskArguments (12) - Random (12)
- Rational (12)
- String (114)
- StringScanner (24)
- Struct (16)
- Symbol (45)
- Thread (36)
- Time (14)
- Vector (36)
- WIN32OLE (36)
モジュール
- Enumerable (240)
-
Fiddle
:: Importer (12) -
JSON
:: Generator :: GeneratorMethods :: Array (12) - Kernel (36)
-
Net
:: HTTPHeader (156) -
REXML
:: StreamListener (12) -
Rake
:: TaskManager (24) - TSort (23)
キーワード
- & (12)
- * (24)
- + (12)
- << (12)
- <=> (24)
- == (24)
- [] (72)
- []= (36)
- abbrev (12)
- add (24)
-
add
_ attribute (12) -
add
_ dependency (12) -
add
_ development _ dependency (12) -
add
_ field (12) -
add
_ runtime _ dependency (12) -
alias
_ method (4) - all? (21)
- any? (32)
- anybits? (8)
- at (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) -
attribute
_ of (12) - basename (12)
- bind (12)
-
body
_ stream (12) -
body
_ stream= (12) - bytebegin (2)
- byteend (2)
- byteindex (3)
- byteoffset (6)
- byterindex (3)
- bytes (12)
- byteslice (36)
- casecmp (12)
- casecmp? (9)
- children (12)
-
class
_ variables (12) - cleanpath (12)
- coerce (60)
- collect2 (24)
- combination (24)
- concat (33)
- constants (12)
-
content
_ type= (12) - count (36)
- crypt (12)
- curry (34)
- cycle (12)
-
deconstruct
_ keys (20) - default (12)
-
define
_ method (24) -
define
_ singleton _ method (24) - delete (60)
-
delete
_ at (12) -
delete
_ attribute (12) - dig (30)
- display (12)
- drop (12)
- each (48)
-
each
_ child (24) -
each
_ element _ with _ attribute (12) -
each
_ strongly _ connected _ component _ from (23) -
end
_ with? (6) - entity (12)
- entitydecl (12)
- eql? (12)
-
family
_ addrinfo (24) - fetch (108)
-
fetch
_ values (22) - fill (24)
-
find
_ index (36) - first (36)
- flatten (24)
- flatten! (12)
- get (12)
-
get
_ fields (12) - getbyte (12)
- hstack (12)
- import (12)
-
in
_ namespace (12) - index (36)
- inject (24)
- insert (12)
-
install
_ rb (12) -
instance
_ methods (12) - intersection (6)
- join (12)
- key (12)
- key? (24)
- last (24)
-
local
_ variable _ get (12) - log (24)
- map2 (12)
- max (42)
-
max
_ by (48) - merge (12)
- merge! (12)
- methods (12)
- min (42)
-
min
_ by (48) -
module
_ function (24) -
named
_ captures (12) -
next
_ year (12) - none? (7)
-
ole
_ query _ interface (12) - one? (21)
- pack (21)
- parameters (24)
- peek (12)
- peep (12)
- permutation (24)
- pop (12)
- post (12)
-
pretty
_ print (36) -
pretty
_ print _ cycle (12) -
prev
_ year (12) -
primitive
_ convert (48) - priority (12)
- priority= (12)
- private (36)
-
private
_ instance _ methods (12) - product (24)
-
proxy
_ basic _ auth (12) -
psych
_ y (12) -
psych
_ yaml _ as (4) - public (12)
- putback (12)
-
read
_ body (24) - reduce (24)
-
relative
_ path _ from (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) - replace (12)
-
respond
_ to _ missing? (12) - rindex (36)
- rotate (12)
- rotate! (12)
- sample (24)
-
satisfied
_ by? (12) - scrub (12)
- scrub! (12)
-
set
_ content _ type (12) - setbyte (12)
- setproperty (24)
- shift (24)
-
singleton
_ methods (12) - slice (12)
- slice! (24)
- start (36)
-
start
_ with? (6) - step (62)
- store (12)
- strftime (12)
- summarize (24)
-
summary
_ indent= (12) -
summary
_ width= (12) -
synthesize
_ file _ task (12) - syswrite (12)
- take (36)
- tally (8)
-
to
_ csv (12) -
to
_ json (36) - tokenize (12)
-
transform
_ keys (12) -
transform
_ keys! (12) -
type
_ params (12) - union (7)
- unpack (12)
- unshift (12)
- update (12)
-
values
_ at (24) -
with
_ object (24) - write (12)
-
yaml
_ as (4) - zip (24)
- | (12)
検索結果
先頭5件
-
Array
# -(other) -> Array (21325.0) -
自身から other の要素を取り除いた配列を生成して返します。
...自身から other の要素を取り除いた配列を生成して返します。
要素の同一性は Object#eql? により評価されます。
self 中で重複していて、other中に存在していなかった要素は、その重複が保持されます。
@param other 自身から取......場合は to_ary メソッドによ
る暗黙の型変換を試みます。
@raise TypeError 引数に配列以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
[1, 2, 1, 3, 1, 4] - [4, 2] #......=> [1, 1, 3, 1]
[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}......=> [1, 1, 3, 1]
[1, 2, 1, 3, 1, 4] - [1, 4] # => [2, 3]
//}
@see Array#difference... -
Net
:: HTTPHeader # type _ params -> Hash (18467.0) -
Content-Type のパラメータを {"charset" => "iso-2022-jp"} という形の Hash で返します。
...ntent-Type のパラメータを {"charset" => "iso-2022-jp"}
という形の Hash で返します。
Content-Type: ヘッダフィールドが存在しない場合には
空のハッシュを返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.htm......l')
res = Net::HTTP.get_response(uri)
res.type_params # => {"charset"=>"UTF-8"}
//}... -
Kernel
# y(*objects) -> nil (18339.0) -
objects を YAML document として標準出力に出力します。
...objects を YAML document として標準出力に出力します。
このメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予......定であるため、特別の事情がない限り y を用いてください。
@param objects YAML document に変換する Ruby のオブジェクト... -
Net
:: HTTPHeader # set _ content _ type(type , params = {}) (15553.0) -
type と params から Content-Type: ヘッダフィールドの 値を設定します。
...type と params から Content-Type: ヘッダフィールドの
値を設定します。
@param type メディアタイプを文字列で指定します。
@param params パラメータ属性をハッシュで指定します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.......example.com/index.html')
req = Net::HTTP::Get.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data' # => "multipart/form-data"
req.content_type # => "multipart/form-data"
//}... -
REXML
:: DocType # entity(name) -> String | nil (15313.0) -
name という実体参照名を持つ実体を文字列で返します。
...XML::Entity#unnormalized 参照)
された文字列が返されます。
name という名前を持つ実体が存在しない場合には nil を返します。
@param name 実体参照名(文字列)
//emlist[][ruby]{
doctype = REXML::Document.new(<<EOS).doctype
<!DOCTYPE foo [
<!ENTITY bar "b......arbarbarbar">
]>
EOS
p doctype.entity("bar") # => "barbarbar"
p doctype.entity("foo") # => nil
//}... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (15313.0) -
与えられたタスク名をもとにファイルタスクを合成します。
...合成します。
@param task_name タスク名を指定します。
@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場合は nil を返します。
@raise RuntimeError タスクを......。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_fil... -
Struct
# deconstruct _ keys(array _ of _ names) -> Hash (15313.0) -
self のメンバの名前と値の組を Hash で返します。
...param array_of_names 返り値に含めるメンバの名前の配列を指定します。nil の場合は全てのメンバを意味します。
//emlist[例][ruby]{
Customer = Struct.new(:name, :address, :zip)
joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
h = joe.deconstruct_key......12345, :address=>"123 Maple, Anytown NC"}
# 引数が nil の場合は全てのメンバを返します。
h = joe.deconstruct_keys(nil)
h # => {:name=>"Joseph Smith, Jr.", :address=>"123 Maple, Anytown NC", :zip=>12345}
//}
[注意] 本メソッドの記述は Struct の下位クラスのイン......スタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see d:spec/pattern_matching#matching_non_primitive_objects... -
JSON
:: Generator :: GeneratorMethods :: Array # to _ json(state _ or _ hash = nil) -> String (15213.0) -
自身から生成した JSON 形式の文字列を返します。
...す。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]{
require "......json"
[1, 2, 3].to_json # => "[1,2,3]"
//}... -
String
# byterindex(pattern , offset = self . bytesize) -> Integer | nil (12779.0) -
文字列のバイト単位のインデックス offset から左に向かって pattern を探索します。 最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。 見つからなければ nil を返します。
...イト単位のインデックス offset から左に向かって pattern を探索します。
最初に見つかった部分文字列の左端のバイト単位のインデックスを返します。
見つからなければ nil を返します。
引数 pattern は探索する部分文字列ま......たは正規表現で指定します。
offset が負の場合は、文字列の末尾から数えた位置から探索します。
byterindex と String#byteindex とでは、探索方向だけが逆になります。
完全に左右が反転した動作をするわけではありません。
探......//emlist[String#byteindex の場合][ruby]{
p "stringstring".byteindex("ing", 1) # => 3
# ing # ここから探索を始める
# ing
# ing # 右にずらしていってここで見つかる
//}
//emlist[String#byterindex の場合][ruby]{
p "stringstring".byterindex... -
String
# byteindex(pattern , offset = 0) -> Integer | nil (12549.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... -
MatchData
# byteoffset(name) -> [Integer , Integer] | [nil , nil] (12514.0) -
name という名前付きグループに対応する部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...対応する部分文字列のバイト単位のオフセットの
配列 [start, end] を返します。
nameの名前付きグループにマッチした部分文字列がなければ
[nil, nil] を返します。
@param name 名前(シンボルか文字列)
@raise IndexError 正規表現中で......t[例][ruby]{
/(?<year>\d{4})年(?<month>\d{1,2})月(?:(?<day>\d{1,2})日)?/ =~ "2021年1月"
p $~.byteoffset('year') # => [0, 4]
p $~.byteoffset(:year) # => [0, 4]
p $~.byteoffset('month') # => [7, 8]
p $~.byteoffset(:month) # => [7, 8]
p $~.byteoffset('day') # => [nil, nil]
p $~.by......teoffset('century') # => `offset': undefined group name reference: century (IndexError)
//}
@see MatchData#offset... -
MatchData
# byteoffset(n) -> [Integer , Integer] | [nil , nil] (12509.0) -
n 番目の部分文字列のバイト単位のオフセットの 配列 [start, end] を返します。
...のオフセットの
配列 [start, end] を返します。
n番目の部分文字列がマッチしていなければ [nil, nil] を返します。
@param n 部分文字列を指定する数値
@raise IndexError 範囲外の n を指定した場合に発生します。
@see MatchData#offset...