種類
- インスタンスメソッド (55)
- クラス (11)
- 特異メソッド (8)
- 文書 (4)
ライブラリ
- ビルトイン (63)
-
webrick
/ httpservlet / abstract (11)
クラス
モジュール
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) - Numeric (11)
-
absolute
_ path (11) - of (8)
- send (22)
- service (11)
検索結果
先頭5件
- Object
# method(name) -> Method - RubyVM
:: InstructionSequence # absolute _ path -> String | nil - RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - WEBrick
:: HTTPServlet :: AbstractServlet # service(request , response) -> ()
-
Object
# method(name) -> Method (18260.0) -
オブジェクトのメソッド name をオブジェクト化した Method オブジェクトを返します。
...
Method オブジェクトを返します。
@param name メソッド名をSymbol またはStringで指定します。
@raise NameError 定義されていないメソッド名を引数として与えると発生します。
//emlist[][ruby]{
me = -365.method(:abs)
p me #=> #<Method: Integer#abs>
p......me.call #=> 365
//}
@see Module#instance_method, Method, BasicObject#__send__, Object#send, Kernel.#eval, Object#singleton_method... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (6118.0) -
self が表す命令シーケンスの絶対パスを返します。
...ed>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see R... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (3106.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...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(:hello))
#... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3106.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...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(:hello))
#... -
WEBrick
:: HTTPServlet :: AbstractServlet # service(request , response) -> () (3016.0) -
指定された WEBrick::HTTPRequest オブジェクト request の WEBrick::HTTPRequest#request_method に応じて、 自身の do_GET, do_HEAD, do_POST, do_OPTIONS... いずれかのメソッドを request と response を引数として呼びます。
...指定された WEBrick::HTTPRequest オブジェクト request の WEBrick::HTTPRequest#request_method に応じて、
自身の do_GET, do_HEAD, do_POST, do_OPTIONS... いずれかのメソッドを request と response を引数として呼びます。
WEBrick::HTTPServer オブジェクトは......クエストがあるたびに
サーブレットオブジェクトを生成し service メソッドを呼びます。
特に理由が無い限り AbstractServlet のサブクラスがこのメソッドを定義する必要はありません。
@param request クライアントからのリクエ......@param response クライアントへのレスポンスを表す WEBrick::HTTPResponse オブジェクトです。
@raise WEBrick::HTTPStatus::MethodNotAllowed
指定された WEBrick::HTTPRequest オブジェクト req が自身に定義されていない
HTTP のメソッドで... -
NEWS for Ruby 3
. 0 . 0 (138.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...a=>1}] # and deprecation warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern......e, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end
//}
* Endless method definition is added. [EXPERIMENTAL]
16746
//emlist{
def square(x) = x * x
//}
* Interpolated String literals are no longer frozen when......s and a object multiple times in a method when possible.
* Optimize accesses in some core classes like Hash and their subclasses.
* Method inlining support for some C methods
* `Kernel`: `#class`, `#frozen?`
* `Integer`: `#-@`, `#~`, `#abs`, `#bit_length`, `#even?`, `#int... -
Numeric (18.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...------------------------------------------------------------------------------------------
abs | o - o o o - o
abs2 | o - - - - - o......o - - -
round | o o - - o o -
singleton_method_added | o - - - - - -
size | - - o o......tional Complex
--------------------------------------------------------------------------------
abs | o o o o o
abs2 | o - - - o
angle | o -......der | o o - - -
round | o o o o -
singleton_method_added | o - - - -
size | - o - - -... -
Object
# send(name , *args) -> object (18.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...end(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def foo() "foo" end
def bar() "bar" end
def baz() "baz" end
end
# 任意のキーとメソッド(の名前)の関係をハッシュに保持しておく
# レシーバの情報がここにはないことに注意
methods = {......ーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method... -
Object
# send(name , *args) { . . . . } -> object (18.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...end(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def foo() "foo" end
def bar() "bar" end
def baz() "baz" end
end
# 任意のキーとメソッド(の名前)の関係をハッシュに保持しておく
# レシーバの情報がここにはないことに注意
methods = {......ーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kernel.#eval, Proc, Method...