2489件ヒット
[1-100件を表示]
(0.070秒)
別のキーワード
ライブラリ
- ビルトイン (975)
- bigdecimal (12)
- csv (264)
- date (24)
- erb (12)
- fiber (8)
- fiddle (12)
- json (36)
- logger (12)
-
net
/ http (36) - openssl (540)
- optparse (48)
- pathname (36)
- prettyprint (12)
- psych (48)
- rake (60)
-
rake
/ packagetask (12) -
rdoc
/ parser / ruby (12) - resolv (12)
-
rexml
/ document (60) - ripper (12)
-
ripper
/ filter (12) -
ripper
/ sexp (24) -
rubygems
/ installer (12) -
rubygems
/ requirement (36) -
rubygems
/ version (12) - set (18)
- socket (12)
- stringio (36)
- strscan (12)
-
syslog
/ logger (12) - uri (12)
-
webrick
/ ssl (12) - win32ole (36)
クラス
- Addrinfo (12)
- Array (36)
- BigDecimal (12)
- CSV (240)
-
CSV
:: Row (12) -
CSV
:: Table (12) - Class (24)
- Data (18)
- Date (24)
- Dir (72)
- ERB (12)
-
Encoding
:: Converter (48) - Enumerator (25)
-
Enumerator
:: Chain (7) -
Enumerator
:: Lazy (12) - Exception (24)
- Fiber (36)
-
Fiddle
:: Closure :: BlockCaller (12) - File (84)
-
File
:: Stat (12) - FrozenError (14)
-
Gem
:: Installer (12) -
Gem
:: Requirement (36) -
Gem
:: Version (12) - Hash (48)
- IO (48)
-
JSON
:: Parser (12) -
JSON
:: State (12) - KeyError (28)
- Logger (12)
- Module (24)
-
Net
:: HTTP (36) - Object (24)
-
OpenSSL
:: ASN1 :: BMPString (24) -
OpenSSL
:: ASN1 :: BitString (24) -
OpenSSL
:: ASN1 :: Boolean (24) -
OpenSSL
:: ASN1 :: Enumerated (24) -
OpenSSL
:: ASN1 :: GeneralString (24) -
OpenSSL
:: ASN1 :: GeneralizedTime (24) -
OpenSSL
:: ASN1 :: GraphicString (24) -
OpenSSL
:: ASN1 :: IA5String (24) -
OpenSSL
:: ASN1 :: ISO64String (24) -
OpenSSL
:: ASN1 :: Integer (24) -
OpenSSL
:: ASN1 :: Null (24) -
OpenSSL
:: ASN1 :: NumericString (24) -
OpenSSL
:: ASN1 :: OctetString (24) -
OpenSSL
:: ASN1 :: PrintableString (24) -
OpenSSL
:: ASN1 :: Sequence (24) -
OpenSSL
:: ASN1 :: Set (24) -
OpenSSL
:: ASN1 :: T61String (24) -
OpenSSL
:: ASN1 :: UTCTime (24) -
OpenSSL
:: ASN1 :: UTF8String (24) -
OpenSSL
:: ASN1 :: UniversalString (24) -
OpenSSL
:: ASN1 :: VideotexString (24) -
OpenSSL
:: BN (36) - OptionParser (48)
- Pathname (36)
- PrettyPrint (12)
- Proc (19)
-
Psych
:: Visitors :: YAMLTree (12) -
RDoc
:: Parser :: Ruby (12) -
REXML
:: CData (12) -
REXML
:: Text (12) -
REXML
:: XPath (36) -
Rake
:: FileList (12) -
Rake
:: InvocationChain (12) -
Rake
:: NameSpace (12) -
Rake
:: PackageTask (12) -
Rake
:: TaskArguments (12) - Random (24)
- Range (12)
- Regexp (24)
-
Resolv
:: DNS (12) - Ripper (36)
-
Ripper
:: Filter (12) -
RubyVM
:: InstructionSequence (36) - Set (24)
- SignalException (36)
- String (31)
- StringIO (36)
- StringScanner (12)
- Struct (64)
-
Syslog
:: Logger (12) - SystemCallError (12)
- Thread (24)
-
Thread
:: Queue (8) - ThreadGroup (12)
- Time (43)
- TracePoint (24)
-
URI
:: FTP (12) -
WEBrick
:: GenericServer (12) - WIN32OLE (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ VARIANT (12)
モジュール
-
GC
:: Profiler (12) - JSON (12)
- Psych (24)
- Rake (12)
オブジェクト
- ENV (24)
キーワード
- === (12)
- Proxy (12)
- [] (54)
- []= (12)
-
abort
_ on _ exception= (12) - accept (12)
- application= (12)
- civil (12)
- compile (24)
-
compile
_ option= (12) -
const
_ load (12) - create (12)
-
create
_ id (12) - current (12)
- default (12)
- define (6)
- dump (24)
- each (12)
- exception (12)
- filter (36)
- first (12)
-
for
_ fd (12) - foreach (24)
- format (12)
- generate (12)
-
generate
_ line (12) - getwd (12)
- instance (24)
-
keyword
_ init? (4) - link (12)
- match (12)
- members (12)
-
new
_ seed (12) - now (12)
- open (168)
- parse (24)
-
parse
_ line (12) - path (12)
- produce (6)
- pwd (12)
- read (12)
- readlines (12)
- reject (12)
- result (12)
-
search
_ convpath (12) - sexp (12)
-
sexp
_ raw (12) - start (24)
- stop (12)
- store (12)
- symlink (12)
- table (12)
- trace (12)
- utime (12)
-
yaml
_ tag (12) - yield (12)
検索結果
先頭5件
- RDoc
:: Parser :: Ruby . new(top _ level , file _ name , body , options , stats) -> RDoc :: Parser :: Ruby - Psych
:: Visitors :: YAMLTree . new(options = {} , emitter = Psych :: TreeBuilder . new , ss = Psych :: ScalarScanner . new) -> Psych :: Visitors :: YAMLTree - Logger
. new(logdev , shift _ age = 0 , shift _ size = 1048576 , level: Logger :: Severity :: DEBUG , progname: nil , formatter: Formatter . new , datetime _ format: nil , shift _ period _ suffix: & # 39;%Y%m%d& # 39;) -> Logger - Random
. new(seed = Random . new _ seed) -> Random - CSV
. new(data , options = Hash . new) -> CSV
-
RDoc
:: Parser :: Ruby . new(top _ level , file _ name , body , options , stats) -> RDoc :: Parser :: Ruby (21203.0) -
自身を初期化します。
自身を初期化します。
@param top_level RDoc::TopLevel オブジェクトを指定します。
@param file_name ファイル名を文字列で指定します。
@param body ソースコードの内容を文字列で指定します。
@param options RDoc::Options オブジェクトを指定します。
@param stats RDoc::Stats オブジェクトを指定します。 -
Psych
:: Visitors :: YAMLTree . new(options = {} , emitter = Psych :: TreeBuilder . new , ss = Psych :: ScalarScanner . new) -> Psych :: Visitors :: YAMLTree (18310.0) -
YAMLTree オブジェクトを生成します。
...プションが指定できます。
emitter には AST の構築に使われる Psych::TreeBuilder オブジェクト
を渡します。
ss は Ruby の String が YAML document 上で quote が必要かどうか
を判定するための Psych::ScalarScanner オブジェクトを渡します。... -
Logger
. new(logdev , shift _ age = 0 , shift _ size = 1048576 , level: Logger :: Severity :: DEBUG , progname: nil , formatter: Formatter . new , datetime _ format: nil , shift _ period _ suffix: & # 39;%Y%m%d& # 39;) -> Logger (18257.0) -
Logger オブジェクトを生成します。
...list[例][ruby]{
require 'logger'
logger = Logger.new(STDERR)
logger = Logger.new(STDOUT)
logger = Logger.new('logfile.log')
file = File.open('foo.log', File::WRONLY | File::APPEND | File::CREAT)
logger = Logger.new(file, 'daily')
logger = Logger.new(file, level: :info)
logger = Logger.new(file, pr......ogname: 'progname')
logger = Logger.new(file, formatter: formatter)
logger = Logger.new(file, datetime_format: '%Y-%m-%d %H:%M:%S')
//}... -
Random
. new(seed = Random . new _ seed) -> Random (18237.0) -
メルセンヌ・ツイスタに基づく擬似乱数発生装置オブジェクトを作ります。 引数が省略された場合は、Random.new_seedの値を使用します。
...。
引数が省略された場合は、Random.new_seedの値を使用します。
@param seed 擬似乱数生成器の種を整数で指定します。
//emlist[例: 種が同じなら同じ乱数列を発生できる。][ruby]{
prng = Random.new(1234)
[ prng.ra......] #=> [0.1915194503788923, 0.6221087710398319]
[ prng.rand(10), prng.rand(1000) ] #=> [4, 664]
# 同じ乱数列を発生する。
prng = Random.new(1234)
[ prng.rand, prng.rand ] #=> [0.1915194503788923, 0.6221087710398319]
[ prng.rand(10), prng.rand(1000) ] #... -
CSV
. new(data , options = Hash . new) -> CSV (18227.0) -
このメソッドは CSV ファイルを読み込んだり、書き出したりするために String か IO のインスタンスをラップします。
...//emlist[例: ファイルの読み込み][ruby]{
require "csv"
users =<<-EOS
id,first name,last name,age
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
c......t name":"tanaka" "age":"20">
end
//}
//emlist[例 文字列の読み込み][ruby]{
require "csv"
users =<<-EOS
id|first name|last name|age
1|taro|tanaka|20
2|jiro|suzuki|18
3|ami|sato|19
4|yumi|adachi|21
EOS
csv = CSV.new(users, headers: true, col_sep: "|")
p csv.class # => CSV
p csv.first # => #... -
RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (18224.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
...引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定しま......れかで指定します。詳細は
RubyVM::InstructionSequence.compile_option= を参照
してください。
RubyVM::InstructionSequence.compile("a = 1 + 2")
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
@see RubyVM::InstructionSequence.compile_file... -
Syslog
:: Logger . new(program _ name = & # 39;ruby& # 39;) -> Syslog :: Logger (18203.0) -
Syslog::Logger オブジェクトを初期化します。
Syslog::Logger オブジェクトを初期化します。
@param program_name Logger との互換性のために用意されています。
プログラム名を文字列で指定できますが、最初の
Syslog::Logger の初期化時のみ、指定した値がセッ
トされます(syslog の仕様で 1 つのプログラム名のみが
採用されます)。 -
Range
. new(first , last , exclude _ end = false) -> Range (18192.0) -
first から last までの範囲オブジェクトを生成して返しま す。
...emlist[例: 整数の範囲オブジェクトの場合][ruby]{
Range.new(1, 10) # => 1..10
Range.new(1, 10, true) # => 1...10
//}
//emlist[例: 日付オブジェクトの範囲オブジェクトの場合][ruby]{
require 'date'
Range.new(Date.today, Date.today >> 1).each {|d| puts d }
# => 20......の場合][ruby]{
require 'ipaddr'
Range.new(IPAddr.new("192.0.2.1"), IPAddr.new("192.0.2.3")).each {|ip| puts ip}
# => 192.0.2.1
# 192.0.2.2
# 192.0.2.3
//}
//emlist[例: 自作のオブジェクトの場合][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
//}... -
Proc
. new -> Proc (18163.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 wit......を省略した呼び出しを行ったときに発生します。
//emlist[例][ruby]{
def foo
pr = Proc.new
pr.call(1)
end
foo {|arg| p arg }
# => 1
//}
これは以下と同じです。
//emlist[例][ruby]{
def foo
yield(1)
end
foo {|arg| p arg }
# => 1
//}
呼び出し元のメソッ......例外
ArgumentError が発生します。
//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 が定義されていれば
オブ...