1124件ヒット
[1-100件を表示]
(0.036秒)
別のキーワード
種類
- インスタンスメソッド (639)
- 特異メソッド (337)
- モジュール関数 (148)
ライブラリ
- ビルトイン (623)
- base64 (24)
- csv (12)
- drb (12)
- erb (16)
-
irb
/ inspector (12) - matrix (84)
-
minitest
/ spec (3) - mkmf (60)
- pathname (36)
- prime (24)
- psych (50)
- rake (36)
-
rexml
/ document (36) -
rubygems
/ dependency _ installer (12) -
rubygems
/ source _ info _ cache (24) - shellwords (12)
- syslog (24)
- win32ole (24)
クラス
- CSV (12)
-
DRb
:: DRbObject (12) - Data (3)
- ERB (16)
- Enumerator (24)
-
Gem
:: DependencyInstaller (12) -
Gem
:: SourceInfoCache (24) - Hash (24)
- IO (168)
-
IRB
:: Inspector (12) - Matrix (72)
- Method (44)
- Module (13)
- Object (14)
- Pathname (36)
-
Prime
:: PseudoPrimeGenerator (24) -
REXML
:: Child (12) -
REXML
:: Element (24) -
Rake
:: TaskArguments (12) - String (85)
- Symbol (12)
- Thread (36)
- Time (12)
- Vector (12)
-
WIN32OLE
_ EVENT (24)
モジュール
- Base64 (24)
- Enumerable (115)
- FileUtils (12)
- Kernel (124)
- Marshal (24)
- Psych (38)
-
Rake
:: TaskManager (12) - Shellwords (12)
- Syslog (24)
キーワード
- < (12)
- === (8)
- [] (12)
- abort (24)
-
angle
_ with (12) - build (24)
- call (24)
- children (12)
-
delete
_ prefix (8) -
delete
_ prefix! (8) -
delete
_ suffix (8) -
delete
_ suffix! (8) -
dir
_ config (12) - dump (48)
- each (24)
-
each
_ child (24) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) -
each
_ with _ index (48) -
each
_ with _ object (24) -
end
_ with? (18) -
enhance
_ with _ matching _ rule (12) - exit (12)
-
find
_ gems _ with _ sources (12) -
infect
_ with _ assertions (1) -
keys
_ with _ inspector (12) - mask (12)
- mask= (12)
-
max
_ by (48) -
must
_ be _ within _ delta (1) -
must
_ be _ within _ epsilon (1) - new (41)
-
new
_ with _ uri (12) -
on
_ event (12) -
on
_ event _ with _ outargs (12) - popen (168)
-
replace
_ with (12) -
report
_ on _ exception (18) -
report
_ on _ exception= (18) - result (8)
-
result
_ with _ hash (8) -
safe
_ load (14) -
search
_ with _ source (24) - sh (12)
- shelljoin (12)
-
start
_ with? (18) - strftime (12)
- system (28)
-
to
_ h (19) -
transform
_ keys (12) -
transform
_ keys! (12) -
urlsafe
_ decode64 (12) -
urlsafe
_ encode64 (12) -
with
_ config (24) -
with
_ defaults (12) -
with
_ object (48) -
with
_ werror (24) -
yaml
_ tag (12)
検索結果
先頭5件
- Data
# with(**kwargs) -> Data - REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () - Symbol
# start _ with?(*prefixes) -> bool - REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () - String
# start _ with?(*prefixes) -> bool
-
Data
# with(**kwargs) -> Data (18119.0) -
self をコピーしたオブジェクトを返します。
...数に対応するメンバには引数の値が設定されます。存在しないメンバを指定した場合はエラーとなります。
@param kwargs コピーされたオブジェクトに設定されるメンバの値を指定します。
@raise ArgumentError 存在しないメンバを......me, :age)
dog1 = Dog.new("Fred", 5) # => #<data Dog name="Fred", age=5>
dog2 = dog1.with(age: 6) # => #<data Dog name="Fred", age=6>
p dog1 # => #<data Dog name="Fred", age=5>
dog3 = dog1.with(type: "Terrier") # => ArgumentError (unknown keyword: :type)
# メンバのオブ... -
REXML
:: Element # each _ element _ with _ attribute(key , value = nil , max = 0 , name = nil) {|element| . . . } -> () (6149.0) -
特定の属性を持つすべての子要素を引数としてブロックを呼び出します。
...すると、max の指定は無視されます(0個ではありません)。
@param key 属性名(文字列)
@param value 属性値(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::......ch_element_with_attribute('id'){|e| p e }
# >> <b id='1'/>
# >> <c id='2'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1'){|e| p e }
# >> <b id='1'/>
# >> <d id='1'/>
doc.root.each_element_with_attribute('id', '1', 1){|e| p e }
# >> <b id='1'/>
doc.root.each_element_with_attribute(... -
Symbol
# start _ with?(*prefixes) -> bool (6149.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...ます。
(self.to_s.start_with?と同じです。)
@param prefixes パターンを表す文字列または正規表現 (のリスト)
@see Symbol#end_with?
@see String#start_with?
//emlist[][ruby]{
:hello.start_with?("hell") #=> true
:hello.start_with?(/H/i) #=> t......rue
# returns true if one of the prefixes matches.
:hello.start_with?("heaven", "hell") #=> true
:hello.start_with?("heaven", "paradise") #=> false
//}... -
REXML
:: Element # each _ element _ with _ text(text = nil , max = 0 , name = nil) {|element| . . . } -> () (6143.0) -
テキストを子ノードとして 持つすべての子要素を引数としてブロックを呼び出します。
...ん)。
@param text テキストの中身(文字列)
@param max ブロック呼出の対象とする子要素の最大個数
@param name xpath文字列
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new '<a><b>b</b><c>b</c><d>d</d><e/></a>'
doc.root.each_element_with_text {|e|p e......}
# >> <b> ... </>
# >> <c> ... </>
# >> <d> ... </>
doc.root.each_element_with_text('b'){|e|p e}
# >> <b> ... </>
# >> <c> ... </>
doc.root.each_element_with_text('b', 1){|e|p e}
# >> <b> ... </>
doc.root.each_element_with_text(nil, 0, 'd'){|e|p e}
# >> <d> ... </>
//}... -
String
# start _ with?(*prefixes) -> bool (6143.0) -
self の先頭が prefixes のいずれかであるとき true を返します。
...返します。
@param prefixes パターンを表す文字列または正規表現 (のリスト)
//emlist[例][ruby]{
"string".start_with?("str") # => true
"string".start_with?("ing") # => false
"string".start_with?("ing", "str") # => true
"string".start_with?(/\w/)......# => true
"string".start_with?(/\d/) # => false
//}
@see String#end_with?
@see String#delete_prefix, String#delete_prefix!... -
Symbol
# end _ with?(*suffixes) -> bool (6143.0) -
self の末尾が suffixes のいずれかであるとき true を返します。
...(self.to_s.end_with?と同じです。)
@param suffixes パターンを表す文字列 (のリスト)
@see Symbol#start_with?
@see String#end_with?
//emlist[][ruby]{
:hello.end_with?("ello") #=> true
# returns true if one of the +suffixes+ matches.
:hello.end_with?("heaven", "ell......o") #=> true
:hello.end_with?("heaven", "paradise") #=> false
//}... -
Enumerable
# each _ with _ index(*args) -> Enumerator (6138.0) -
要素とそのインデックスをブロックに渡して繰り返します。
...り返すような
Enumerator を返します。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。
@param args イテレータメソッド (each など) にそのまま......each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}
//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo|", 0]
# ["bar|", 1]
# ["baz", 2]
//}
@see Enumerator#with_index... -
Enumerable
# each _ with _ index(*args) {|item , index| . . . } -> self (6138.0) -
要素とそのインデックスをブロックに渡して繰り返します。
...り返すような
Enumerator を返します。
Enumerator#with_index は offset 引数を受け取りますが、
each_with_index は受け取りません (引数はイテレータメソッドにそのまま渡されます)。
@param args イテレータメソッド (each など) にそのまま......each_with_index do |n, idx|
p [n, idx]
end
# => [5, 0]
# [10, 1]
# [15, 2]
//}
//emlist[引数ありの例][ruby]{
require 'stringio'
StringIO.new("foo|bar|baz").each_with_index("|") do |s, i|
p [s, i]
end
# => ["foo|", 0]
# ["bar|", 1]
# ["baz", 2]
//}
@see Enumerator#with_index... -
Enumerator
# with _ object(obj) -> Enumerator (6132.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...do |x|
y << x
end
end
to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object... -
Enumerator
# with _ object(obj) {|(*args) , memo _ obj| . . . } -> object (6132.0) -
繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。
...do |x|
y << x
end
end
to_three_with_string = to_three.with_object("foo")
to_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end
# => foo:0
# => foo:1
# => foo:2
//}
@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object... -
String
# end _ with?(*strs) -> bool (6131.0) -
self の末尾が strs のいずれかであるとき true を返します。
...ずれかであるとき true を返します。
@param strs パターンを表す文字列 (のリスト)
//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}
@see String#start_with?......true を返します。
@param strs パターンを表す文字列 (のリスト)
//emlist[例][ruby]{
"string".end_with?("ing") # => true
"string".end_with?("str") # => false
"string".end_with?("str", "ing") # => true
//}
@see String#start_with?
@see String#delete_suffix,...