760件ヒット
[701-760件を表示]
(0.235秒)
別のキーワード
ライブラリ
- ビルトイン (100)
- csv (24)
- date (144)
- dbm (12)
- digest (12)
- gdbm (12)
-
net
/ imap (12) - observer (12)
- rss (264)
-
rubygems
/ commands / update _ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ source _ index (12) -
rubygems
/ specification (12) -
rubygems
/ user _ interaction (12) - sdbm (12)
-
webrick
/ httpresponse (72) -
yaml
/ dbm (12)
クラス
- CSV (24)
- DBM (12)
- Date (144)
-
Digest
:: Base (12) - Exception (24)
- GDBM (12)
-
Gem
:: Commands :: UpdateCommand (12) -
Gem
:: ConfigFile (12) -
Gem
:: SourceIndex (12) -
Gem
:: Specification (12) -
Gem
:: StreamUI :: VerboseProgressReporter (12) - Hash (24)
-
Net
:: IMAP (12) -
RDoc
:: Options (12) -
RSS
:: Maker :: ChannelBase (72) -
RSS
:: Maker :: ItemsBase (12) -
RSS
:: Maker :: ItemsBase :: ItemBase (48) -
RSS
:: Rss :: Channel (48) -
RSS
:: Rss :: Channel :: Item (24) - Range (40)
- SDBM (12)
- Time (12)
-
WEBrick
:: HTTPResponse (72) -
YAML
:: DBM (12)
モジュール
- DublinCoreModel (36)
- Observable (12)
-
RSS
:: SyndicationModel (24)
キーワード
- == (12)
- === (19)
- [] (12)
-
add
_ observer (12) - append (12)
-
backtrace
_ locations (12) - body= (12)
- chunked= (12)
-
content
_ length (12) -
content
_ length= (12) - cover? (19)
- date= (24)
-
dc
_ date (12) -
dc
_ date= (12) -
dc
_ dates (12) -
do
_ rubygems _ update (12) -
do
_ sort= (12) - entries (7)
-
force
_ update (12) - friday? (12)
- gregorian? (12)
- julian? (12)
- lastBuildDate (24)
- lastBuildDate= (24)
- leap? (12)
- monday? (12)
- pubDate (48)
- pubDate= (48)
- saturday? (12)
- strftime (24)
- sunday? (12)
-
sy
_ updateBase (12) -
sy
_ updateBase= (12) - thursday? (12)
-
to
_ a (7) -
to
_ s (12) - tuesday? (12)
-
unconverted
_ fields? (12) - update (96)
-
update
_ sources (12) - updated (12)
- validate (12)
- wednesday? (12)
-
write
_ headers? (12)
検索結果
先頭5件
-
CSV
# unconverted _ fields? -> bool (155.0) -
パースした結果が unconverted_fields というメソッドを持つ場合に真を返します。 そうでない場合は、偽を返します。
...ます。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10")
csv.unconverted_fields? # => nil
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", unconverted_fields: false)
csv.unconverted_fields? # => false
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10", h......eaders: true, unconverted_fields: true)
csv.unconverted_fields? # => true
csv.convert(:date)
row = csv.readline
row.fields # => [#<Date: 2018-07-09 ((2458309j,0s,0n),+0s,2299161j)>, #<Date: 2018-07-10 ((2458310j,0s,0n),+0s,2299161j)>]
row.unconverted_fields # => ["2018-07-09", "2018-07... -
Range
# ===(obj) -> bool (143.0) -
始端と終端の中に obj があるとき、true を返します。 そうでないとき、false を返します。
...始端と終端の中に obj があるとき、true を返します。
そうでないとき、false を返します。
Range#=== は主に case 式での比較に用いられます。
//emlist[例][ruby]{
p (0...50) === 79 #=> false
p (60...80) === 79 #=> true
case 79
when 0...60 then puts......計はありません。
//emlist[例][ruby]{
require 'date'
p (Date.today - 100...Date.today + 100).include?(DateTime.now) #=> false
p (Date.today - 100...Date.today + 100).cover?(DateTime.now) #=> true
p (Date.today - 100...Date.today + 100) === DateTime.now #=> true
# 2.5 以前は、......していました。
//}
2.7 以降の === は、文字列も Range#cover? と同様の処理をするようになりました。
//emlist[例][ruby]{
p ('a'..'z').include? 'at' #=> false
p ('a'..'z').cover? 'at' #=> true
p ('a'..'z') === 'at' #=> true
# 2.6 以前は、=== は、includ... -
Range
# cover?(range) -> bool (129.0) -
2.6 以降の cover? は、Range#include? や Range#=== と異なり、 引数に Range オブジェクトを指定して比較できます。
...st[引数が Range の例][ruby]{
(1..5).cover?(2..3) #=> true
(1..5).cover?(0..6) #=> false
(1..5).cover?(1...6) #=> true
//}
「(a..b).cover?(c...d)」のように終端を含まない Range オブジェクトが引数に渡されており、
「a <= c && b < d」を満たし、cが数......るために succ メソッドの呼び出しが必要な)場合、パフォーマンスの問題が起きる可能性があります。
//emlist[パフォーマンス上の問題が起きる例][ruby]{
p ('aaaaa'..'zzzzy').cover?('aaaaa'...'zzzzz') # => true
//}
@see Range#include?, Range#===... -
CSV
# write _ headers? -> bool (113.0) -
ヘッダを出力先に書き込む場合は真を返します。 そうでない場合は偽を返します。
...ッダを出力先に書き込む場合は真を返します。
そうでない場合は偽を返します。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("date1,date2\n2018-07-09,2018-07-10")
csv.write_headers? # => nil
header = ["header1", "header2"]
row = ["row1_1", "row1_2"]
result = CSV.... -
Exception
# ==(other) -> bool (113.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
results = [2, 2, 4].m......essage }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]
# class, message, backtrace が同一のため true になる
p results[0] == results[1] # => true
# class, backtrace が同一だが、message がことなるため false になる
p results[0] == results[2]... -
Range
# entries -> Array (37.0) -
self を配列に変換します。
...生します。
//emlist[例][ruby]{
p (5..0).to_a # => []
p (0..3).to_a # => [0, 1, 2, 3]
p ('a'..'c').to_a # => ["a", "b", "c"]
p (:a..:d).to_a # => [:a, :b, :c, :d]
require 'date'
p (Date.new(1965, 4, 14) .. Date.new(1965, 4, 14)).to_a # => [#<Date: 1965-04-14 ((2438865j,0s,0n),+0s,... -
Range
# to _ a -> Array (37.0) -
self を配列に変換します。
...生します。
//emlist[例][ruby]{
p (5..0).to_a # => []
p (0..3).to_a # => [0, 1, 2, 3]
p ('a'..'c').to_a # => ["a", "b", "c"]
p (:a..:d).to_a # => [:a, :b, :c, :d]
require 'date'
p (Date.new(1965, 4, 14) .. Date.new(1965, 4, 14)).to_a # => [#<Date: 1965-04-14 ((2438865j,0s,0n),+0s,...