264件ヒット
[1-100件を表示]
(0.053秒)
クラス
- Pathname (11)
-
Psych
:: TreeBuilder (22) -
Psych
:: Visitors :: YAMLTree (88) -
RubyVM
:: AbstractSyntaxTree :: Node (42)
モジュール
- FileUtils (11)
-
RubyVM
:: AbstractSyntaxTree (24)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) - Nodes (11)
- YAMLTree (11)
- children (6)
- finish (11)
- finished (11)
- finished? (11)
-
first
_ column (6) -
first
_ lineno (6) - inspect (6)
-
last
_ column (6) -
last
_ lineno (6) - new (22)
- of (8)
- parse (8)
-
parse
_ file (8) -
rb
_ parser _ append _ print (11) -
rb
_ parser _ while _ loop (11) - rdoc (11)
- rmtree (22)
- root (11)
- start (11)
- started (11)
- started? (11)
- type (6)
検索結果
先頭5件
- Psych
:: Visitors :: YAMLTree # tree -> Psych :: Nodes :: Stream|nil - Pathname
# rmtree -> nil - Psych
:: Visitors :: YAMLTree - Psych
:: Visitors :: YAMLTree . new(options = {} , emitter = Psych :: TreeBuilder . new , ss = Psych :: ScalarScanner . new) -> Psych :: Visitors :: YAMLTree - RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node
-
Psych
:: Visitors :: YAMLTree # tree -> Psych :: Nodes :: Stream|nil (21201.0) -
変換を終了し、構築した AST を返します。
...変換を終了し、構築した AST を返します。
内部で finish を呼び出し、変換処理を終了します。
このメソッドを2回以上呼ぶと、2回目以降は nil を返します。
@see Psych::Visitors::YAMLTree#finish... -
Pathname
# rmtree -> nil (6200.0) -
FileUtils.rm_r(self.to_s) と同じです。
FileUtils.rm_r(self.to_s) と同じです。
@see FileUtils.#rm_r -
Psych
:: Visitors :: YAMLTree (6024.0) -
Ruby オブジェクトから YAML の AST を構築するためのクラスです。
...のクラスです。
=== 例
builder = Psych::Visitors::YAMLTree.new
builder << { :foo => 'bar' }
builder << ["baz", "bazbaz"]
builder.tree # => #<Psych::Nodes::Stream ... > A stream containing two documents
puts tree.to_yaml
# =>
# ---
# :foo: bar
# ---
# - baz
# - bazbaz... -
Psych
:: Visitors :: YAMLTree . new(options = {} , emitter = Psych :: TreeBuilder . new , ss = Psych :: ScalarScanner . new) -> Psych :: Visitors :: YAMLTree (3300.0) -
YAMLTree オブジェクトを生成します。
...YAMLTree オブジェクトを生成します。
options には構築される YAML AST に設定されるオプション設定を指定します。
Psych.dump と同じオプションが指定できます。
emitter には AST の構築に使われる Psych::TreeBuilder オブジェクト
を渡......常デフォルトのものから変える必要はないでしょう。
@param options オプション
@param emitter AST の構築に使う Psych::TreeBuilder オブジェクト
@param ss 文字列に quite が必要かどうかを判定するための Psych::ScalarScanner オブジェクト... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (3278.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...ntaxTree.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=2", error_tolerant: true)
# => (SCOPE@1:0-1:15......# tbl: [:x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))))
//}... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3278.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...ntaxTree.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=2", error_tolerant: true)
# => (SCOPE@1:0-1:15......# tbl: [:x, :y]
# args: nil
# body: (BLOCK@1:0-1:15 (LASGN@1:0-1:5 :x (LIT@1:4-1:5 1)) (ERROR@1:7-1:11) (LASGN@1:12-1:15 :y (LIT@1:14-1:15 2))))
//}... -
RubyVM
:: AbstractSyntaxTree . of(proc) -> RubyVM :: AbstractSyntaxTree :: Node (3260.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...SyntaxTree.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))
# => (SCOPE@5:0-7:3
#......(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 "hell... -
RubyVM
:: AbstractSyntaxTree . of(proc , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3260.0) -
引数 proc に渡したProcやメソッドオブジェクトの抽象構文木を返します。
...SyntaxTree.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))
# => (SCOPE@5:0-7:3
#......(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 "hell... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname) -> RubyVM :: AbstractSyntaxTree :: Node (3248.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...yntaxTree.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)
# :parse_file (LIST@1:41-1:49......(STR@1:41-1:49 "") nil)) nil)))
//}... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (3248.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...yntaxTree.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)
# :parse_file (LIST@1:41-1:49......(STR@1:41-1:49 "") nil)) nil)))
//}... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (3236.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))))
//}... -
FileUtils
. # rmtree(list , options = {}) -> () (3200.0) -
ファイルまたはディレクトリ list を再帰的に消去します。
ファイルまたはディレクトリ list を再帰的に消去します。
rm_r(list, force: true) と同じです。
@param list 削除する対象。一つの場合は文字列も指定可能です。
二つ以上指定する場合は配列で指定します。
@param options :noop, :verbose, :secure が指定できます。
c:FileUtils#options
=== 注意
このメソッドにはローカル脆弱性が存在します。
この脆弱性を回避するには :secure オプションを使用してください。
詳しくは FileUt... -
Psych
:: TreeBuilder . new -> Psych :: TreeBuilder (3200.0) -
TreeBuilder オブジェクトを生成します。
...TreeBuilder オブジェクトを生成します。... -
Psych
:: Visitors :: YAMLTree # finish -> Psych :: Nodes :: Stream|nil (3106.0) -
変換を終了し、構築した AST を返します。
...変換を終了し、構築した AST を返します。
このメソッドは2回呼び出さないでください。
@see Psych::Visitors::YAMLTree#tree...