1542件ヒット
[401-500件を表示]
(0.153秒)
ライブラリ
- ビルトイン (252)
- csv (12)
- erb (36)
-
json
/ add / exception (12) -
minitest
/ mock (1) -
minitest
/ unit (23) - mkmf (12)
-
net
/ http (48) -
net
/ imap (12) -
net
/ smtp (24) - openssl (12)
- optparse (84)
- pathname (36)
- rake (336)
-
rake
/ loaders / makefile (12) -
rake
/ packagetask (24) -
rake
/ testtask (72) -
rubygems
/ server (12) -
rubygems
/ source _ index (12) -
rubygems
/ spec _ fetcher (12) -
rubygems
/ specification (96) -
rubygems
/ validator (12) - set (18)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - strscan (312)
- uri (12)
クラス
-
ARGF
. class (87) - Binding (7)
- CSV (12)
- Dir (12)
- ERB (36)
- Exception (44)
-
Gem
:: Server (12) -
Gem
:: SourceIndex (12) -
Gem
:: SpecFetcher (12) -
Gem
:: Specification (96) -
Gem
:: Validator (12) - IO (36)
- Method (12)
-
MiniTest
:: Mock (1) -
MiniTest
:: Unit (7) -
MiniTest
:: Unit :: TestCase (2) - Module (12)
-
Net
:: HTTPGenericRequest (48) -
Net
:: IMAP (12) -
Net
:: SMTP (24) -
ObjectSpace
:: WeakMap (12) -
OpenSSL
:: BN (12) - OptionParser (84)
- Pathname (36)
-
Rake
:: Application (108) -
Rake
:: FileList (72) -
Rake
:: FileTask (12) -
Rake
:: InvocationChain (12) -
Rake
:: MakefileLoader (12) -
Rake
:: PackageTask (24) -
Rake
:: TaskArguments (12) -
Rake
:: TestTask (72) - Set (24)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (12)
- StringScanner (312)
- TracePoint (24)
-
URI
:: Generic (12)
モジュール
-
Gem
:: InstallUpdateOptions (12) - Kernel (24)
-
MiniTest
:: Assertions (14) -
Rake
:: Cloneable (12) -
Rake
:: TaskManager (96)
キーワード
- [] (30)
- []= (12)
-
add
_ loader (12) - append (12)
-
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ match (1) -
assert
_ operator (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
backtrace
_ locations (12) - body (12)
- body= (12)
-
body
_ stream (12) -
body
_ stream= (12) -
capture
_ io (1) - check (12)
-
check
_ until (12) - chr (12)
-
const
_ source _ location (12) -
create
_ makefile (12) -
create
_ rule (12) - ctime (12)
-
current
_ scope (12) -
def
_ class (12) -
delete
_ if (12) - desc (12)
- dup (24)
-
each
_ char (24) -
each
_ codepoint (24) - egrep (12)
- empty? (12)
- eos? (12)
-
exception
_ details (1) - exist? (12)
- expect (1)
- fetch (12)
- fnmatch (12)
- getc (12)
- gets (27)
- gsub (12)
- gsub! (12)
-
has
_ test _ suite? (12) -
has
_ unit _ tests? (12) - import (12)
-
in
_ namespace (12) - init (12)
-
inplace
_ mode (12) - inspect (30)
-
install
_ update _ defaults _ str (12) -
last
_ comment (12) -
last
_ description (12) -
last
_ description= (12) -
latest
_ specs (36) - load (12)
- location (1)
- lookup (12)
- match? (12)
-
matched
_ size (12) -
mu
_ pp (1) - name (12)
-
new
_ scope (12) -
on
_ head (12) -
on
_ tail (12) -
original
_ dir (12) -
package
_ files (12) -
package
_ files= (12) - parse (24)
- parse! (12)
- pass (1)
- passed? (1)
- path (12)
- pathmap (12)
- pattern (12)
- pattern= (12)
- peek (12)
- peep (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (12)
-
post
_ match (12) -
pre
_ match (12) -
prime
_ fasttest? (12) -
process
_ args (1) -
program
_ name= (12) - puke (1)
- puts (24)
- rakefile (12)
- read (12)
- ready (12)
- reject! (12)
- report (1)
- report= (1)
- rest? (12)
-
rest
_ size (12) - restsize (12)
- result (12)
-
ruby
_ opts (12) -
ruby
_ opts= (12) - run (12)
- scan (12)
-
scan
_ full (12) -
scan
_ until (12) -
search
_ full (12) - select (12)
-
set
_ backtrace (12) - setup (1)
- skip (13)
-
skip
_ until (12) - skips (1)
- skips= (1)
-
source
_ location (7) - sub! (12)
-
sub
_ ext (12) -
test
_ file (12) -
test
_ file= (12) -
test
_ files (12) -
test
_ files= (12) -
test
_ suite _ file (12) -
test
_ suite _ file= (12) -
to
_ a (12) -
to
_ json (12) -
to
_ s (6) -
top
_ level (12) -
top
_ level _ tasks (12) -
tty
_ output= (12) -
unit
_ test (12) - unscan (12)
検索結果
先頭5件
-
StringScanner
# pos=(n) (6155.0) -
スキャンポインタのインデックスを n にセットします。
...スキャンポインタのインデックスを n にセットします。
@param n 整数で、バイト単位で指定します。
負数を指定すると文字列の末尾からのオフセットとして扱います。
@raise RangeError マッチ対象の文字列の長さを超え......s = StringScanner.new('test string')
p s.scan(/\w+/) # => "test"
p s.pos = 1 # => 1
p s.scan(/\w+/) # => "est"
p s.pos = 7 # => 7
p s.scan(/\w+/) # => "ring"
begin
s.pos = 20
rescue RangeError => err
puts err #=> index out of range
end
p s.pos = -4 # => -4
p s.scan(/\w+/) # => "rin... -
Method
# inspect -> String (6149.0) -
self を読みやすい文字列として返します。
...の文字列を返します。
#<Method: klass1(klass2)#method(arg) foo.rb:2> (形式1)
klass1 は、Method#inspect では、レシーバのクラス名、
UnboundMethod#inspect では、UnboundMethod オブジェクトの生成
元となったクラス/モジュール名です。
klass2......oo
def foo
"foo"
end
end
class Bar
include Foo
def bar(a, b)
end
end
p Bar.new.method(:foo) # => #<Method: Bar(Foo)#foo() test.rb:2>
p Bar.new.method(:bar) # => #<Method: Bar#bar(a, b) test.rb:8>
//}
klass1 と klass2 が同じ場合は以下の形式になります。......end
end
p obj.method(:foo) # => #<Method: "".foo() foo.rb:4>
# クラスメソッド(クラスの特異メソッド)
class Foo
def Foo.foo
end
end
p Foo.method(:foo) # => #<Method: Foo.foo() foo.rb:11>
# スーパークラスのクラスメソッド
class Bar < Foo
end
p Bar.metho... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (6149.0) -
各要素に String#pathmap を適用した新しい Rake::FileList を返します。
...ing#pathmap を適用した新しい Rake::FileList を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.pathmap("%n") # => ["test1", "test2", "test3"]......end
//}
@see String#pathmap... -
ARGF
. class # each _ codepoint -> Enumerator (6137.0) -
self の各コードポイントに対して繰り返しブロックを呼びだします。
...or を返します。
例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt
# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,1... -
ARGF
. class # each _ codepoint { |c| . . . } -> self (6137.0) -
self の各コードポイントに対して繰り返しブロックを呼びだします。
...or を返します。
例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt
# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,110,101,49,10,108,105,1... -
Rake
:: Application # top _ level (6137.0) -
Rake アプリケーションに与えられたトップレベルのタスク (コマンドラインで指定されたタスク) を実行します。
...たトップレベルのタスク
(コマンドラインで指定されたタスク) を実行します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test1
task :test1
task :test2 do
puts "test2"
end
# rake test2 で実行
Rake.application.top_level
# => "test2"
//}... -
StringScanner
# skip(regexp) -> Integer | nil (6137.0) -
スキャンポインタの地点だけで regexp と文字列のマッチを試します。 マッチしたらスキャンポインタを進めマッチした部分文字列の 長さを返します。マッチしなかったら nil を返します。
...ンポインタの地点だけで regexp と文字列のマッチを試します。
マッチしたらスキャンポインタを進めマッチした部分文字列の
長さを返します。マッチしなかったら nil を返します。
@param regexp マッチに使用する正規表現を......指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.skip(/\w+/) #=> 4
p s.skip(/\w+/) #=> nil
p s.skip(/\s+/) #=> 1
p s.skip(/\w+/) #=> 6
p s.skip(/./) #=> nil
//}... -
OptionParser
# parse!(argv = self . default _ argv) -> [String] (6131.0) -
与えられた argv をパースします。
...ptionParser#permute! と同様に argv を破壊的にパースします。
環境変数に POSIXLY_CORRECT が設定されている場合は、
OptionParser#order! と同様に振舞います。
@param argv パースしたい引数を文字列の配列で指定します。
@raise OptionParser::P......実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
ARGV......# => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARGV # => ["test"]
//}... -
OptionParser
# parse!(argv = self . default _ argv , into: nil) -> [String] (6131.0) -
与えられた argv をパースします。
...す。
OptionParser#permute! と同様に argv を破壊的にパースします。
環境変数に POSIXLY_CORRECT が設定されている場合は、
OptionParser#order! と同様に振舞います。
@param argv パースしたい引数を文字列の配列で指定します。
@param into......ションを格納するハッシュを指定します。
指定したハッシュにはオプションの名前をキーとして、OptionParser#onに渡されたブロックの値が格納されます。
キーの名前はロングオプションが定義されていれば......se OptionParser::ParseError パースに失敗した場合、発生します。
実際は OptionParser::ParseError のサブク
ラスになります。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.... -
StringScanner
# inspect -> String (6131.0) -
StringScannerオブジェクトを表す文字列を返します。
...r.new('test string')
s.inspect # => "#<StringScanner 0/11 @ \"test ...\">"
s.scan(/\w+/) # => "test"
s.inspect # => "#<StringScanner 4/11 \"test\" @ \" stri...\">"
s.scan(/\s+/) # => " "
s.inspect......# => "#<StringScanner 5/11 \"test \" @ \"strin...\">"
s.scan(/\w+/) # => "string"
s.inspect # => "#<StringScanner fin>"
//}... -
Rake
:: TaskArguments # new _ scope(names) -> Rake :: TaskArguments (6125.0) -
与えられたパラメータ名のリストを使用して新しい Rake::TaskArguments を作成します。
...。
@param names パラメータ名のリストを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
new_arguments = arguments.new_scope(["na......me3", "name4"])
p new_arguments # => #<Rake::TaskArguments >
p new_arguments.names # => ["name3", "name4"]
end
//}...