ライブラリ
- ビルトイン (339)
- bigdecimal (12)
-
minitest
/ unit (1) - pathname (12)
-
rdoc
/ text (12) -
rdoc
/ top _ level (24) - resolv (24)
- set (18)
- uri (24)
-
webrick
/ httpserver (24) -
webrick
/ httpservlet / abstract (120)
クラス
- BigDecimal (12)
- Bignum (6)
- Complex (36)
- File (18)
- Fixnum (6)
- Float (24)
- Integer (24)
- Numeric (36)
- Object (36)
- Pathname (12)
-
RDoc
:: TopLevel (24) - Rational (18)
-
Resolv
:: DNS :: Name (24) -
RubyVM
:: AbstractSyntaxTree :: Node (49) -
RubyVM
:: InstructionSequence (12) - Set (24)
-
Thread
:: Backtrace :: Location (12) -
URI
:: Generic (24) -
WEBrick
:: HTTPServer :: MountTable (24) -
WEBrick
:: HTTPServlet :: AbstractServlet (108)
モジュール
-
MiniTest
:: Assertions (1) -
RDoc
:: Text (12) -
RubyVM
:: AbstractSyntaxTree (30)
キーワード
- AbstractServlet (12)
- AbstractSyntaxTree (7)
-
NEWS for Ruby 3
. 0 . 0 (5) - Node (7)
- Numeric (12)
- [] (12)
- abs2 (24)
- absolute (12)
- absolute? (36)
-
absolute
_ path (36) -
absolute
_ path? (6) -
assert
_ in _ epsilon (1) - children (7)
- delete (12)
- divide (24)
-
do
_ DELETE (12) -
do
_ GET (12) -
do
_ HEAD (12) -
do
_ OPTIONS (12) -
do
_ POST (12) -
do
_ PUT (12) -
file
_ absolute _ name (12) -
file
_ absolute _ name= (12) -
first
_ column (7) -
first
_ lineno (7) -
get
_ instance (12) - inspect (7)
-
last
_ column (7) -
last
_ lineno (7) - magnitude (63)
- method (12)
- new (24)
- of (10)
- parse (10)
-
parse
_ file (10) - send (24)
- service (12)
- type (7)
-
webrick
/ httpservlet / abstract (12)
検索結果
先頭5件
-
Thread
:: Backtrace :: Location # absolute _ path -> String (6100.0) -
self が表すフレームの絶対パスを返します。
...][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see Thread::Backtrace::Location#path... -
URI
:: Generic # absolute -> bool (6100.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false... -
URI
:: Generic # absolute? -> bool (6100.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
...自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false... -
RubyVM
:: AbstractSyntaxTree (6000.0) -
Ruby のコードをパースして得られる抽象構文木を扱うモジュールです。
...Ruby のコードをパースして得られる抽象構文木を扱うモジュールです。
抽象構文木はRubyVM::AbstractSyntaxTree::Nodeクラスのインスタンスとして表されます。
このモジュールはMRIの抽象構文木の実装の詳細を表します。
このモ......し安定したAPIやMRI以外の実装で抽象構文木を扱いたい場合、
parser gem (https://github.com/whitequark/parser)や
Ripperの使用を検討してください。
もし RubyVM::AbstractSyntaxTree のAPIを安定にしたい場合、14844 での議論に参加してください。... -
WEBrick
:: HTTPServlet :: AbstractServlet (6000.0) -
サーブレットの抽象クラスです。実装は AbstractServlet のサブクラスで行います。
...ラスです。実装は AbstractServlet のサブクラスで行います。
サーブレットは以下のように使われます。WEBrick::HTTPServlet::CGIHandler は
webrick/httpservlet/cgihandler で提供されているサーブレットです。
CGIHandler は AbstractServlet のサブク... -
webrick
/ httpservlet / abstract (6000.0) -
-
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...list[][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(metho... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...list[][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(metho... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...指定します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1......す。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...す。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-1:9
# tbl: [:x]
# args: nil
# body:
# (LASGN@1:0-1:9 :x
# (OPCALL@1:4-1:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
pp RubyVM::AbstractSyntaxTree.parse("x = 1; p(x; y=... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...mlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse_file(__FILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
#... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3100.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...mlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse_file(__FILE__)
# => (SCOPE@1:0-1:50
# tbl: []
# args: nil
# body:
# (FCALL@1:0-1:50 :pp
# (LIST@1:3-1:50
# (CALL@1:3-1:50
# (COLON2@1:3-1:29 (CONST@1:3-1:9 :RubyVM) :AbstractSyntaxTree)
#... -
WEBrick
:: HTTPServlet :: AbstractServlet . get _ instance(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (3100.0) -
new(server, *options) を呼び出してサーブレットを生成して返します。 WEBrick::HTTPServer オブジェクトは実際にはこの get_instance メソッドを呼び出して サーブレットを生成します。
...ジェクトは実際にはこの get_instance メソッドを呼び出して
サーブレットを生成します。
特に理由が無い限り AbstractServlet のサブクラスがこのメソッドを再定義する必要はありません。
@param server WEBrick::HTTPServer#mount 第3引数... -
WEBrick
:: HTTPServlet :: AbstractServlet . new(server , *options) -> WEBrick :: HTTPServlet :: AbstractServlet (3100.0) -
サーブレットを生成して返します。 WEBrick::HTTPServer オブジェクトは server に自身を指定してサーブレットを生成します。
サーブレットを生成して返します。
WEBrick::HTTPServer オブジェクトは server に自身を指定してサーブレットを生成します。
@param server サーブレットを生成する WEBrick::HTTPServer オブジェクトを指定します。
@param options WEBrick::HTTPServer#mount 第3引数以降に指定された値がそのまま与えられます。