314件ヒット
[101-200件を表示]
(0.149秒)
ライブラリ
- ビルトイン (139)
- fileutils (12)
-
irb
/ context (12) -
irb
/ extend-command (12) -
irb
/ input-method (48) - json (12)
-
minitest
/ unit (1) - openssl (24)
-
shell
/ command-processor (6) -
syslog
/ logger (12) - win32ole (36)
クラス
- Enumerator (14)
-
IRB
:: Context (12) -
IRB
:: FileInputMethod (12) -
IRB
:: InputMethod (12) -
IRB
:: ReadlineInputMethod (12) -
IRB
:: StdioInputMethod (12) -
MiniTest
:: Unit :: TestCase (1) - NoMethodError (19)
-
OpenSSL
:: SSL :: SSLContext (24) - Regexp (24)
-
RubyVM
:: InstructionSequence (36) -
Shell
:: CommandProcessor (6) -
Syslog
:: Logger (12) - TracePoint (12)
- WIN32OLE (12)
-
WIN32OLE
_ METHOD (12) -
WIN32OLE
_ PARAM (12)
モジュール
オブジェクト
- main (24)
キーワード
-
collect
_ method (12) -
define
_ method (24) - disasm (12)
- disassemble (12)
-
irb
_ original _ method _ name (12) -
json
_ create (12) -
last
_ match (24) -
make
_ methods (12) -
method
_ added (6) - new (153)
- of (22)
-
ole
_ show _ help (12) -
test
_ methods (1)
検索結果
先頭5件
-
IRB
:: FileInputMethod . new(path) -> IRB :: FileInputMethod (6301.0) -
自身を初期化します。
...自身を初期化します。
@param path パスを文字列で指定します。... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (6207.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...st[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:44 (LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(......# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_init: nil
# rest: nil
# kw: nil
# kwrest: nil
# block: nil)
# body:
# (FCALL@6:2-6:21 :puts......(LIST@6:7-6:21 (STR@6:7-6:21 "hello, world") nil)))
//}......す。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると......所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:......LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_... -
IRB
:: InputMethod . new(file = STDIN _ FILE _ NAME) -> IRB :: InputMethod (6201.0) -
自身を初期化します。
自身を初期化します。 -
IRB
:: ReadlineInputMethod . new -> IRB :: ReadlineInputMethod (6201.0) -
自身を初期化します。
自身を初期化します。 -
IRB
:: StdioInputMethod . new -> IRB :: StdioInputMethod (6201.0) -
自身を初期化します。
自身を初期化します。 -
NoMethodError
. new(error _ message = "" , name = nil , args = nil) -> NoMethodError (6201.0) -
例外オブジェクトを生成して返します。
...param error_message エラーメッセージを表す文字列です
@param name 未定義だったシンボルです
@param args メソッド呼び出しに使われた引数です
例:
nom = NoMethodError.new("message", "foo", [1,2,3])
p nom.name
p nom.args
# => "foo"
[1, 2, 3]... -
NoMethodError
. new(error _ message = "" , name = nil , args = nil , priv = false) -> NoMethodError (6201.0) -
例外オブジェクトを生成して返します。
...ソッド呼び出しに使われた引数です
@param priv private なメソッドを呼び出せる形式 (関数形式(レシーバを省略した形式)) で呼ばれたかどうかを指定します
例:
nom = NoMethodError.new("message", "foo", [1,2,3])
p nom.name
p nom.args
# =......数です
@param priv private なメソッドを呼び出せる形式 (関数形式(レシーバを省略した形式)) で呼ばれたかどうかを指定します
@param receiver 原因となったメソッド呼び出しのレシーバです
例:
nom = NoMethodError.new("message", "foo", [1... -
NoMethodError
. new(error _ message = "" , name = nil , args = nil , priv = false , receiver:) -> NoMethodError (6201.0) -
例外オブジェクトを生成して返します。
...数です
@param priv private なメソッドを呼び出せる形式 (関数形式(レシーバを省略した形式)) で呼ばれたかどうかを指定します
@param receiver 原因となったメソッド呼び出しのレシーバです
例:
nom = NoMethodError.new("message", "foo", [1... -
Regexp
. last _ match(nth) -> String | nil (6107.0) -
整数 nth が 0 の場合、マッチした文字列を返します ($&)。それ以外では、nth 番目の括弧にマッチ した部分文字列を返します($1,$2,...)。 対応する括弧がない場合やマッチしなかった場合には nil を返し ます。
...整数 nth が 0 の場合、マッチした文字列を返します
($&)。それ以外では、nth 番目の括弧にマッチ
した部分文字列を返します($1,$2,...)。
対応する括弧がない場合やマッチしなかった場合には nil を返し
ます。
//emlist[例][ruby]{......ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match(0) # => "ab"
p Regexp.last_match(1) # => "a"
p Regexp.last_match(2) # => "b"
p Regexp.last_match(3) # => nil
//}
正規表現全体がマッチしなかった場合、引数なしの
Regexp.last_match はnil を返......last_match[1] の形式では例外 NoMethodError が発生します。
対して、last_match(1) は nil を返します。
//emlist[例][ruby]{
str = "This is Regexp"
/That is Regexp/ =~ str
p Regexp.last_match # => nil
begin
p Regexp.last_match[1] # 例外が発生する
rescue
puts $! # =... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (6107.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...す。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると......所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.of(proc {1 + 2})
# => (SCOPE@2:38-2:45
# tbl: []
# args: nil
# body:
# (OPCALL@2:39-2:44 (LIT@2:39-2:40 1) :+
# (LIST@2:43-2:......LIT@2:43-2:44 2) nil)))
def hello
puts "hello, world"
end
pp RubyVM::AbstractSyntaxTree.of(method(:hello))
# => (SCOPE@5:0-7:3
# tbl: []
# args:
# (ARGS@5:9-5:9
# pre_num: 0
# pre_init: nil
# opt: nil
# first_post: nil
# post_num: 0
# post_... -
Regexp
. last _ match -> MatchData (6102.0) -
カレントスコープで最後に行った正規表現マッチの MatchData オ ブジェクトを返します。このメソッドの呼び出しは $~ の参照と同じです。
...MatchData オ
ブジェクトを返します。このメソッドの呼び出しは $~
の参照と同じです。
//emlist[例][ruby]{
/(.)(.)/ =~ "ab"
p Regexp.last_match # => #<MatchData:0x4599e58>
p Regexp.last_match[0] # => "ab"
p Regexp.last_match[1] # => "a"
p Regexp.last_match[2]......# => "b"
p Regexp.last_match[3] # => nil
//}... -
IRB
:: Context . new(irb , workspace = nil , input _ method = nil , output _ method = nil) -> IRB :: Context (3415.0) -
自身を初期化します。
...た場合は新しく作成されます。
@param input_method String、IRB::InputMethod のサブクラスの
オブジェクト、nil のいずれかを指定します。
@param output_method IRB::OutputMethod のサブクラスのオブジェクト......を指定します。省略した場合は
IRB::StdioOutputMethod オブジェクトが新しく
作成されます。...