12件ヒット
[1-12件を表示]
(0.083秒)
種類
- インスタンスメソッド (8)
- 特異メソッド (4)
クラス
モジュール
キーワード
- absolute (1)
- absolute? (1)
- children (1)
-
first
_ column (1) -
first
_ lineno (1) - inspect (1)
-
last
_ column (1) -
last
_ lineno (1) -
parse
_ file (2)
検索結果
先頭5件
- RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String
-
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (64243.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリ... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (63943.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
文字列を抽象構文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリ... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (45943.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
@param pathname パースする対象のファイルパスを指定します
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR である... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (45943.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
@param pathname パースする対象のファイルパスを指定します
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を指定すると、 Node#token が利用できます。
@param error_tolerant true を指定すると、構文エラーが発生した際にエラー箇所を type が :ERROR である... -
RubyVM
:: AbstractSyntaxTree :: Node # inspect -> String (27619.0) -
self のデバッグ用の情報を含んだ文字列を返します。
self のデバッグ用の情報を含んだ文字列を返します。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
puts node.inspect
# => #<RubyVM::AbstractSyntaxTree::Node:SCOPE@1:0-1:5>
//} -
RubyVM
:: AbstractSyntaxTree :: Node # last _ lineno -> Integer (27619.0) -
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
ソースコード中で、self を表すテキストが最後に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_lineno # => 1
//} -
URI
:: Generic # absolute -> bool (27337.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 (27337.0) -
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
自身に scheme が設定されているなら true を返します。そうでない場合は false を返します。
例:
require 'uri'
p URI.parse('http://example.com/').absolute? #=> true
p URI.parse('./').absolute? #=> false -
RubyVM
:: AbstractSyntaxTree :: Node # children -> Array (27319.0) -
self の子ノードを配列で返します。
self の子ノードを配列で返します。
どのような子ノードが返ってくるかは、そのノードの type によって異なります。
戻り値は、ほかの RubyVM::AbstractSyntaxTree::Node のインスタンスや nil を含みます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.children
# => [[], nil, #<RubyVM::AbstractSyntaxTree::Node:OPCALL@1:0-1:5>]
//} -
RubyVM
:: AbstractSyntaxTree :: Node # first _ column -> Integer (27319.0) -
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
ソースコード中で、self を表すテキストが最初に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_column # => 0
//} -
RubyVM
:: AbstractSyntaxTree :: Node # first _ lineno -> Integer (27319.0) -
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
ソースコード中で、self を表すテキストが最初に現れる行番号を返します。
行番号は1-originです。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 2')
p node.first_lineno # => 1
//} -
RubyVM
:: AbstractSyntaxTree :: Node # last _ column -> Integer (9319.0) -
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
ソースコード中で、self を表すテキストが最後に現れる列番号を返します。
列番号は0-originで、バイト単位で表されます。
//emlist[][ruby]{
node = RubyVM::AbstractSyntaxTree.parse('1 + 1')
p node.last_column # => 5
//}