2072件ヒット
[1-100件を表示]
(0.062秒)
ライブラリ
- ビルトイン (780)
-
cgi
/ session (22) -
cgi
/ session / pstore (11) - csv (11)
- date (99)
-
digest
/ sha2 (11) - drb (11)
- fiddle (22)
- ipaddr (11)
-
net
/ ftp (22) -
net
/ http (22) -
net
/ pop (22) -
net
/ smtp (28) -
net
/ telnet (4) - openssl (550)
- optparse (44)
- ostruct (11)
- pathname (11)
- prime (11)
-
rdoc
/ markup / to _ html _ crossref (11) - resolv-replace (33)
-
rexml
/ document (22) -
rubygems
/ installer (11) -
rubygems
/ version (11) - set (22)
- shell (6)
- socket (11)
- stringio (33)
- uri (66)
-
webrick
/ httpproxy (11) - win32ole (110)
- zlib (22)
クラス
- Addrinfo (11)
-
CGI
:: Session :: FileStore (11) -
CGI
:: Session :: MemoryStore (11) -
CGI
:: Session :: PStore (11) - CSV (11)
-
DRb
:: DRbServer (11) - Data (12)
- Date (44)
- DateTime (55)
-
Digest
:: SHA2 (11) - Dir (66)
- Enumerator (5)
-
Enumerator
:: Lazy (11) - Fiber (11)
-
Fiddle
:: Handle (22) - File (66)
-
File
:: Stat (11) -
Gem
:: Installer (11) -
Gem
:: Version (11) - Hash (44)
- IO (286)
- IPAddr (11)
-
Net
:: FTP (22) -
Net
:: HTTP (22) -
Net
:: POP3 (22) -
Net
:: SMTP (28) -
Net
:: Telnet (4) -
OpenSSL
:: ASN1 :: ObjectId (11) -
OpenSSL
:: BN (33) -
OpenSSL
:: Cipher (11) -
OpenSSL
:: Config (22) -
OpenSSL
:: Digest (11) -
OpenSSL
:: Netscape :: SPKI (22) -
OpenSSL
:: OCSP :: CertificateId (11) -
OpenSSL
:: OCSP :: Request (22) -
OpenSSL
:: PKCS12 (11) -
OpenSSL
:: PKCS7 (11) -
OpenSSL
:: PKey :: DH (33) -
OpenSSL
:: PKey :: DSA (44) -
OpenSSL
:: PKey :: EC (22) -
OpenSSL
:: PKey :: EC :: Group (22) -
OpenSSL
:: PKey :: EC :: Point (33) -
OpenSSL
:: PKey :: RSA (55) -
OpenSSL
:: SSL :: SSLSocket (22) -
OpenSSL
:: SSL :: Session (11) -
OpenSSL
:: X509 :: Attribute (22) -
OpenSSL
:: X509 :: CRL (22) -
OpenSSL
:: X509 :: Certificate (22) -
OpenSSL
:: X509 :: Name (33) -
OpenSSL
:: X509 :: Request (22) -
OpenSSL
:: X509 :: Store (11) -
OpenSSL
:: X509 :: StoreContext (11) - OpenStruct (11)
- OptionParser (44)
- Pathname (11)
- Prime (11)
- Proc (18)
-
RDoc
:: Markup :: ToHtmlCrossref (11) -
REXML
:: Document (11) -
REXML
:: Text (11) - Range (11)
- Regexp (22)
- SOCKSSocket (11)
- Set (22)
- Shell (6)
- StringIO (33)
- Struct (44)
- SystemCallError (44)
- TCPSocket (22)
- Thread (71)
- Time (36)
- TracePoint (22)
-
URI
:: FTP (22) -
URI
:: Generic (11) -
URI
:: HTTP (11) -
URI
:: LDAP (11) -
URI
:: MailTo (11) -
WEBrick
:: HTTPProxyServer (11) - WIN32OLE (44)
-
WIN32OLE
_ EVENT (11) -
WIN32OLE
_ METHOD (11) -
WIN32OLE
_ PARAM (11) -
WIN32OLE
_ TYPE (11) -
WIN32OLE
_ TYPELIB (11) -
WIN32OLE
_ VARIANT (11) -
Zlib
:: GzipReader (11) -
Zlib
:: Inflate (11)
キーワード
- === (11)
- [] (37)
- accept (11)
- civil (22)
- commercial (22)
- compile (11)
-
const
_ load (11) - define (4)
-
for
_ fd (11) - fork (11)
- getopts (22)
-
handle
_ interrupt (11) - inflate (11)
- jd (11)
- link (11)
- load (11)
- locale= (11)
- new2 (11)
- now (11)
-
ole
_ show _ help (11) - open (143)
- ordinal (22)
-
pending
_ interrupt? (11) - pipe (88)
- popen (154)
-
prime
_ division (11) - produce (5)
- register (11)
- reject (11)
-
report
_ on _ exception (8) -
report
_ on _ exception= (8) - start (83)
- symlink (11)
- trace (11)
-
unalias
_ command (6) - utime (11)
-
write
_ smime (11) - yield (11)
検索結果
先頭5件
- CSV
. new(data , options = Hash . new) -> CSV - Range
. new(first , last , exclude _ end = false) -> Range - REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) - OpenSSL
:: BN . new(str , base=10) -> OpenSSL :: BN - WIN32OLE
_ EVENT . new(ole , event = nil) -> WIN32OLE _ EVENT
-
CSV
. new(data , options = Hash . new) -> CSV (18227.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...ing quote
for a field. (In truth, it reads to the first line ending beyond this
size.) If a quote cannot be found within the limit CSV will raise a
MalformedCSVError, assuming the data is faulty. You can use this limit to
prevent what are effectively DoS attacks on the parser. Howeve......ートします。
: :skip_lines
指定した正規表現にマッチしたそれぞれの行をコメントとして読み飛ばします。
@raise CSV::MalformedCSVError 不正な CSV をパースしようとしたときに発生します。
//emlist[例: ファイルの読み込み][ruby]{
re......e
1,taro,tanaka,20
2,jiro,suzuki,18
3,ami,sato,19
4,yumi,adachi,21
EOS
File.write("test.csv", users)
File.open("test.csv", "r") do |f|
csv = CSV.new(f, headers: true)
csv.class # => CSV
csv.first # => #<CSV::Row "id":"1" "first name":"taro" "last name":"tanaka" "age":"20">
end
//}
//emlist[... -
Range
. new(first , last , exclude _ end = false) -> Range (18174.0) -
first から last までの範囲オブジェクトを生成して返しま す。
...を含まない範囲オブジェクトを生成します
@raise ArgumentError first <=> last が nil の場合に発生します
//emlist[例: 整数の範囲オブジェクトの場合][ruby]{
Range.new(1, 10) # => 1..10
Range.new(1, 10, true) # => 1...10
//}
//emlist[例: 日付オブジ......by]{
require 'date'
Range.new(Date.today, Date.today >> 1).each {|d| puts d }
# => 2017-09-16
# 2017-09-17
# ...
# 2017-10-16
//}
//emlist[例: IPアドレスの範囲オブジェクトの場合][ruby]{
require 'ipaddr'
Range.new(IPAddr.new("192.0.2.1"), IPAddr.new("192.0.2.3")).each {|ip|......のオブジェクトの場合][ruby]{
MyInteger = Struct.new(:value) do
def succ
self.class.new(value + 1)
end
def <=>(other)
value <=> other.value
end
def to_s
value.to_s
end
end
Range.new(MyInteger.new(1), MyInteger.new(3)).each {|i| puts i }
# => 1
# 2
# 3
//}... -
REXML
:: Text . new(arg , respect _ whitespace = false , parent = nil , raw = nil , entity _ filter = nil , illegal = REXML :: Text :: NEEDS _ A _ SECOND _ CHECK) (18156.0) -
テキストノードオブジェクトを生成します。
...イブラリ内部用
@raise RuntimeError テキストがXMLのテキストとして不正な
文字を含んでいる場合に発生します。
//emlist[doctype なしの場合][ruby]{
p REXML::Text.new("<&", false, nil, false).to_s # => "<&"
p REXML::Text.new("<&", false, n......L::Text.new("<&", false, nil, true).to_s # => "<&"
p REXML::Text.new("<&", false, nil, true).to_s # parse error
//}
//emlist[doctype があり、実体が宣言されている場合][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
doctype = REXML::Document.new(<<EOS).......doctype
<!DOCTYPE root [
<!ENTITY p "foobar publisher">
<!ENTITY % q "quzz">
]>
<root />
EOS
REXML::Text.new("&quzz", false, doc.root, false).to_s # => "&&q;"
REXML::Text.new("quzz", false, doc.root, true).to_s # => "quzz"
//}... -
OpenSSL
:: BN . new(str , base=10) -> OpenSSL :: BN (18152.0) -
文字列を多倍長整数オブジェクト(OpenSSL::BN)を生成します。
...ssl'
OpenSSL::BN.new("-241") # => -241
OpenSSL::BN.new("ff00",16) # => 65280
OpenSSL::BN.new("\x81",2) # => 129
OpenSSL::BN.new("\xff\x81",2) # => 65409
OpenSSL::BN.new("\x00\x00\x00\x02\x00\x81", 0) # => 129
OpenSSL::BN.new("\x00\x00\x00\x02\x80\x81", 0) # => -129
OpenSSL::BN.new(1209) # => 1209
/....../}
@param str 整数を表す文字列
@param base 文字列から整数に変換するときの基数
@raise OpenSSL::BNError 変換に失敗した場合に発生します
反対に、OpenSSL::BN クラスのオブジェクトを文字列にするには、
OpenSSL::BN#to_s を用います。
@se... -
WIN32OLE
_ EVENT . new(ole , event = nil) -> WIN32OLE _ EVENT (18150.0) -
OLEオートメーションサーバのイベント受信機構をオブジェクト化して返します。
...OLEオートメーションサーバのイベント受信機構をオブジェクト化して返します。
newメソッドは、OLEオートメーションサーバがイベント通知に利用するインター
フェイスを取得し、オブジェクトとして返します。
@param ole......ターフェイスを利用します。
@return 指定したオブジェクトのイベントを管理するWIN32OLE_EVENTオブジェクト。
@raise RuntimeError eventパラメータで指定したIIDが見つかりません。また
はオブジェクトがイベントをサ......ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie)
インターフェイス名を指定した例
ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents2')
IIDを指定した例
ie = WIN32OLE.new('InternetExplore... -
Proc
. new -> Proc (18139.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...クを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生しま......は明示的に & 引数でうけるべきです。
@raise ArgumentError スタック上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これ......umentError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト... -
Proc
. new { . . . } -> Proc (18139.0) -
ブロックをコンテキストとともにオブジェクト化して返します。
...クを指定しない場合、Ruby 2.7 では
$VERBOSE = true のときには警告メッセージ
「warning: Capturing the given block using Proc.new is deprecated; use `&block` instead」
が出力され、Ruby 3.0 では
ArgumentError (tried to create Proc object without a block)
が発生しま......は明示的に & 引数でうけるべきです。
@raise ArgumentError スタック上にブロックがないのにブロックを省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これ......umentError が発生します。
//emlist[例][ruby]{
def foo
Proc.new
end
foo
# => -:2:in `new': tried to create Proc object without a block (ArgumentError)
# from -:2:in `foo'
# from -:4:in `<main>'
//}
Proc.new は、Proc#initialize が定義されていれば
オブジェクト... -
WIN32OLE
_ PARAM . new(ole _ method , index) -> WIN32OLE _ PARAM (18138.0) -
メソッドとパラメータ位置を指定してWIN32OLE_PARAMのインスタンスを作成します。
...してWIN32OLE_PARAMのインスタンスを作成します。
アプリケーションプログラムでは、WIN32OLE_PARAMオブジェクトをnewメソッド
で生成するよりも、WIN32OLE_METHOD#paramsを参照するほうが簡単です。
@param ole_method パラメータを取得す......持つオブジェクトを返します。
@raise TypeError ole_methodパラメータがWIN32OLE_METHODのインスタンスではありません。
@raise IndexError indexパラメータが1からパラメータの数の範囲にありません。
@raise RuntimeError 該当メソッドのメタデ......ータが取得できません。
excel = WIN32OLE.new('Excel.Application')
method = excel.ole_method('Run')
param1 = WIN32OLE_PARAM.new(method, 1)
puts "#{param1.ole_type} #{param1.name}"... -
WIN32OLE
_ TYPELIB . new(libname , mjv = nil , miv = nil) -> WIN32OLE _ TYPELIB (18138.0) -
WIN32OLE_TYPELIBオブジェクトを生成します。
...返します。
@raise WIN32OLERuntimeError 引数で指定したTypeLibが見つかりません。
tlib1 = WIN32OLE_TYPELIB.new('Microsoft Excel 14.0 Object Library')
tlib2 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}')
tlib3 = WIN32OLE_TYPELIB.new('{00020813-0000-000......0-C000-000000000046}', 1.7)
tlib4 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1, 7)
tlib5 = WIN32OLE_TYPELIB.new("C:\\WINDOWS\\SYSTEM32\\SHELL32.DLL")
puts tlib1.name # => 'Microsoft Excel 14.0 Object Library'
puts tlib2.name # => 'Microsoft Excel 14.0 Object L... -
Hash
. new {|hash , key| . . . } -> Hash (18137.0) -
空の新しいハッシュを生成します。ブロックの評価結果がデフォルト値になりま す。設定したデフォルト値はHash#default_procで参照できます。
...実行し、その結果を返します。
ブロックにはそのハッシュとハッシュを参照したときのキーが渡されます。
@raise ArgumentError ブロックと通常引数を同時に与えると発生します。
//emlist[例][ruby]{
# ブロックではないデフォル......値がまだ無いキーが呼び出される度に
# ブロックを評価するので、全て別のオブジェクトになります。
h = Hash.new {|hash, key| hash[key] = "foo"}
p h[1] #=> "foo"
p h[1].object_id #=> 6126900
p h[1] << "bar" #=> "foobar"
p h[1]......>"foobar", 2=>"foo"}
# 値が設定されていないときに(fetchのように)例外をあげるようにもできる
h = Hash.new {|hash, key|
raise(IndexError, "hash[#{key}] has no value")
}
h[1]
# エラー hash[1] has no value (IndexError)
//}
@see Hash#default=...