3766件ヒット
[1-100件を表示]
(0.103秒)
別のキーワード
ライブラリ
- ビルトイン (2726)
- csv (120)
- fiber (8)
- fiddle (12)
- json (324)
-
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) - matrix (120)
- mkmf (12)
-
net
/ http (12) - optparse (24)
- pathname (12)
- pp (24)
- prime (12)
- psych (60)
-
ripper
/ filter (12) - set (36)
- socket (12)
- stringio (48)
- strscan (24)
- thread (8)
- timeout (16)
- win32ole (24)
クラス
- Addrinfo (12)
- Array (440)
- BasicObject (168)
- BigDecimal (12)
- Binding (47)
- CSV (36)
-
CSV
:: FieldInfo (36) -
CSV
:: Row (36) -
CSV
:: Table (12) - Complex (36)
- Date (12)
- DateTime (12)
- Enumerator (48)
-
Enumerator
:: Lazy (23) -
Enumerator
:: Yielder (24) - Exception (12)
- Fiber (42)
-
Fiddle
:: Pointer (12) -
File
:: Stat (24) - FrozenError (6)
- Hash (132)
- IO (12)
- Integer (18)
-
JSON
:: Parser (12) -
JSON
:: State (168) - Matrix (120)
- Method (12)
- Module (72)
- Mutex (2)
-
Net
:: HTTPGenericRequest (12) - Numeric (24)
- Object (520)
- OptionParser (12)
- Pathname (12)
- Prime (12)
- Proc (3)
-
Psych
:: ScalarScanner (12) -
Psych
:: Visitors :: YAMLTree (24) - Random (36)
- Range (175)
- Rational (12)
- Regexp (24)
-
Ripper
:: Filter (12) -
RubyVM
:: InstructionSequence (12) - Set (48)
- String (106)
- StringIO (48)
- StringScanner (24)
- Struct (41)
- Thread (20)
-
Thread
:: Mutex (10) -
Thread
:: Queue (12) -
Thread
:: SizedQueue (36) - Time (48)
- TracePoint (55)
- UnboundMethod (24)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ VARIANT (12)
モジュール
- Comparable (9)
- Enumerable (553)
-
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 (88)
-
OptionParser
:: Arguable (12)
キーワード
- ! (12)
- != (12)
- << (24)
- <=> (12)
- == (12)
- === (12)
- =~ (9)
- JSON (12)
- [] (78)
-
_ _ id _ _ (12) -
_ _ send _ _ (24) -
_ dump (12) - adjugate (12)
-
append
_ as _ bytes (1) -
arg
_ config (12) -
array
_ nl (12) - at (12)
- begin (12)
- bind (12)
-
bind
_ call (12) -
body
_ stream (12) - bsearch (36)
- bytes (12)
-
check
_ circular? (12) -
chunk
_ while (12) - clamp (9)
-
class
_ eval (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) - clone (12)
-
cofactor
_ expansion (12) - collect (24)
-
collect
_ concat (24) - column (24)
- component (12)
- configure (12)
- conj (36)
- conjugate (36)
-
connect
_ from (12) -
const
_ get (12) - convert (24)
- count (24)
- cycle (24)
- default (24)
-
define
_ singleton _ method (24) - delete (48)
-
delete
_ at (12) - deq (12)
- detect (12)
-
dev
_ major (12) - dig (30)
- disable (12)
- disjoint? (12)
- display (12)
- divide (24)
- each (12)
-
each
_ with _ object (24) - element (12)
- enable (12)
- encode (36)
- entries (19)
-
enum
_ for (24) - equal? (12)
- eval (24)
- feed (12)
- fetch (20)
- field (12)
- filter (21)
-
filter
_ map (6) - find (12)
-
find
_ all (12) -
find
_ index (12) - first (48)
-
flat
_ map (24) - getlocal (24)
- grep (12)
-
grep
_ v (12) -
group
_ by (12) - handler= (12)
- hash (12)
- header (12)
- include? (12)
- indent (12)
- indent= (12)
- index (19)
- initialize (12)
-
initialize
_ copy (12) - inject (36)
- inspect (12)
-
instance
_ eval (24) -
instance
_ exec (12) -
instance
_ of? (12) -
instance
_ variable _ defined? (12) -
instance
_ variable _ get (12) -
instance
_ variable _ set (12) -
instance
_ variables (12) -
is
_ a? (12) - itself (12)
- jj (12)
- join (24)
- key (7)
-
kind
_ of? (12) -
laplace
_ expansion (12) - last (12)
- line (12)
- ljust (12)
-
local
_ variable _ get (12) -
local
_ variable _ set (12) - map (24)
- match (24)
- max (66)
-
max
_ by (12) -
max
_ nesting (12) -
max
_ nesting= (12) - member? (7)
- merge (12)
-
method
_ missing (12) - methods (12)
- min (88)
-
min
_ by (12) - minmax (48)
-
minmax
_ by (12) -
module
_ eval (12) -
object
_ id (12) -
object
_ nl (12) -
object
_ nl= (12) - pack (21)
- parameters (10)
- parse (12)
- partition (12)
- pop (24)
-
pretty
_ print (12) -
pretty
_ print _ cycle (12) - print (12)
- printf (12)
-
psych
_ y (12) -
public
_ method (12) -
public
_ send (24) - push (12)
- putc (12)
- puts (12)
- raise (18)
- rand (24)
- rassoc (12)
-
rdev
_ major (12) - receiver (29)
- reduce (36)
- reject (96)
- reject! (60)
-
remove
_ class _ variable (12) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - resume (12)
-
return
_ value (12) - rjust (12)
- sample (24)
-
scan
_ full (12) -
search
_ full (12) - select (36)
- self (12)
- shift (48)
-
singleton
_ class (12) -
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) -
singleton
_ methods (12) - slice (12)
- slice! (12)
-
slice
_ when (23) -
sort
_ by (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - strftime (12)
- sum (42)
- synchronize (12)
- taint (9)
- tainted? (9)
- timeout (16)
-
to
_ a (19) -
to
_ c (12) -
to
_ enum (24) -
to
_ int (12) -
to
_ json (228) -
to
_ s (12) -
to
_ str (12) -
to
_ value (12) - tokenize (12)
- transfer (12)
-
unconverted
_ fields? (12) - unpack (12)
- unpack1 (9)
- unshift (12)
- untaint (9)
- value (12)
-
with
_ index (12) -
with
_ object (24) - write (12)
- y (12)
- yield (12)
-
yield
_ self (16) - zip (24)
検索結果
先頭5件
-
Kernel
# j(*objects) -> nil (18220.0) -
与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
...与えられたオブジェクトを JSON 形式の文字列で標準出力に一行で出力します。
@param objects JSON 形式で出力したいオブジェクトを指定します。
//emlist[例][ruby]{
require "json"
j([1,2,{"name" => "tanaka","age" => 19}])
# => [1,2,{"name":"tanaka","... -
Object
# object _ id -> Integer (15273.0) -
各オブジェクトに対して一意な整数を返します。あるオブジェクトに対し てどのような整数が割り当てられるかは不定です。
...。
Rubyでは、(Garbage Collectされていない)アクティブなオブジェクト間で
重複しない整数(object_id)が各オブジェクトにひとつずつ割り当てられています。この
メソッドはその値を返します。
TrueClass, FalseClass, NilClass, Symbol, Integ......er クラス
のインスタンスなど Immutable(変更不可)なオブジェクトの一部は同じ内容ならば必ず同じ object_id になります。
これは、Immutable ならば複数の場所から参照されても`破壊的操作'による問題が発生しないので、
同......。
//emlist[][ruby]{
p "ruby".object_id #=> 60
p "ruby".object_id #=> 80
p [].object_id #=> 100
p [].object_id #=> 120
p :ruby.object_id #=> 710428
p :ruby.object_id #=> 710428
p 11.object_id #=> 23
p 11.object_id #=> 23
p true.object_id #=> 20
p true.object_id #=> 20
//}
@see Object#equal?,S... -
Object
# define _ singleton _ method(symbol) { . . . } -> Symbol (15237.0) -
self に特異メソッド name を定義します。
...bol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class << self......def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# define _ singleton _ method(symbol , method) -> Symbol (15237.0) -
self に特異メソッド name を定義します。
...bol メソッド名を String または Symbol で指定します。
@param method Proc、Method あるいは UnboundMethod の
いずれかのインスタンスを指定します。
@return メソッド名を表す Symbol を返します。
//emlist[][ruby]{
class A
class << self......def class_name
to_s
end
end
end
A.define_singleton_method(:who_am_i) do
"I am: #{class_name}"
end
A.who_am_i # ==> "I am: A"
guy = "Bob"
guy.define_singleton_method(:hello) { "#{self}: Hello there!" }
guy.hello #=> "Bob: Hello there!"
//}... -
Object
# instance _ variable _ defined?(var) -> bool (15213.0) -
インスタンス変数 var が定義されていたら真を返します。
...//emlist[][ruby]{
class Fred
def initialize(p1, p2)
@a, @b = p1, p2
end
end
fred = Fred.new('cat', 99)
p fred.instance_variable_defined?(:@a) #=> true
p fred.instance_variable_defined?("@b") #=> true
p fred.instance_variable_defined?("@c") #=> false
//}
@see Object#instance_variable_......get,Object#instance_variable_set,Object#instance_variables... -
Enumerable
# find _ index {|obj| . . . } -> Integer | nil (12461.0) -
条件に一致する最初の要素の位置を返します。
...等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index(11) #=> nil
(1..10).find_index(2) #=> 1
//}
ブロックが与えられた場合には、各要素を引数として先頭から......素の位置を返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index {|i| i % 5 == 0 and i % 7 == 0 } #=> nil
(1..100).find_index {|i| i % 5 == 0 and i % 7 == 0 } #=> 34
//}
引数、ブロックのどちらも与えられな... -
Enumerable
# inject(init = self . first) {|result , item| . . . } -> object (12425.0) -
リストのたたみこみ演算を行います。
...リストのたたみこみ演算を行います。
最初に初期値 init と self の最初の要素を引数にブロックを実行します。
2 回目以降のループでは、前のブロックの実行結果と
self の次の要素を引数に順次ブロックを実行します。
そ......して最後の要素まで繰り返し、最後のブロックの実行結果を返します。
要素が存在しない場合は init を返します。
初期値 init を省略した場合は、
最初に先頭の要素と 2 番目の要素をブロックに渡します。
また要素が 1 つ......かなければブロックを実行せずに最初の要素を返します。
要素がなければブロックを実行せずに nil を返します。
@param init 最初の result の値です。任意のオブジェクトが渡せます。
@param sym ブロックの代わりに使われる... -
Enumerable
# inject(init , sym) -> object (12425.0) -
リストのたたみこみ演算を行います。
...リストのたたみこみ演算を行います。
最初に初期値 init と self の最初の要素を引数にブロックを実行します。
2 回目以降のループでは、前のブロックの実行結果と
self の次の要素を引数に順次ブロックを実行します。
そ......して最後の要素まで繰り返し、最後のブロックの実行結果を返します。
要素が存在しない場合は init を返します。
初期値 init を省略した場合は、
最初に先頭の要素と 2 番目の要素をブロックに渡します。
また要素が 1 つ......かなければブロックを実行せずに最初の要素を返します。
要素がなければブロックを実行せずに nil を返します。
@param init 最初の result の値です。任意のオブジェクトが渡せます。
@param sym ブロックの代わりに使われる... -
Array
# join(sep = $ , ) -> String (12325.0) -
配列の要素を文字列 sep を間に挟んで連結した文字列を返します。
...して)
join した文字列を連結します。
ただし、配列要素が自身を含むような無限にネストした配列に対しては、以下
のような結果になります。
//emlist[例][ruby]{
ary = [1,2,3]
ary.push ary
p ary # => [1, 2, 3, [...]]
p ary.join # =>......Error: recursive array join
//}
@param sep 間に挟む文字列を指定します。nil のときは空文字列を使います。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
@raise TypeError......を指定した場合に発生します。
@raise ArgumentError 配列要素が自身を含むような無限にネストした配列に対
して join を呼んだ場合に発生します。
//emlist[例][ruby]{
[1, 2, 3].join('-') #=> "1-2-3"
//}
@see Array#*, $,...