種類
- インスタンスメソッド (325)
- 特異メソッド (54)
- 定数 (33)
- モジュール関数 (11)
ライブラリ
- ビルトイン (16)
- json (11)
-
net
/ http (209) - openssl (11)
- optparse (55)
- psych (22)
- ripper (22)
-
ripper
/ lexer (11) - uri (55)
-
webrick
/ httpproxy (11)
クラス
-
Net
:: HTTPGenericRequest (66) -
Net
:: HTTPResponse (33) -
OpenSSL
:: X509 :: Name (11) - OptionParser (33)
-
OptionParser
:: ParseError (22) -
Psych
:: Nodes :: Node (11) -
Psych
:: ScalarScanner (11) - Ripper (22)
-
Ripper
:: Lexer (11) -
RubyVM
:: AbstractSyntaxTree :: Node (6) -
URI
:: FTP (11) -
URI
:: Generic (44) -
WEBrick
:: HTTPProxyServer (11)
モジュール
- JSON (11)
-
Net
:: HTTPHeader (110) -
RubyVM
:: AbstractSyntaxTree (10)
キーワード
- + (11)
-
OBJECT
_ TYPE _ TEMPLATE (11) -
PARSER
_ EVENTS (11) -
PARSER
_ EVENT _ TABLE (11) - [] (11)
- body (22)
- body= (11)
-
body
_ stream (11) -
body
_ stream= (11) -
content
_ type (11) - delete (11)
- entity (11)
- fetch (33)
-
filter
_ backtrace (11) -
get
_ fields (11) - inspect (6)
-
main
_ type (11) - merge (11)
- new (33)
-
parse
_ file (2) -
parse
_ time (11) -
pretty
_ unparse (11) -
proxy
_ basic _ auth (11) - query (11)
-
read
_ body (11) -
request
_ body _ permitted? (11) -
response
_ body _ permitted? (11) -
set
_ backtrace (11) -
sub
_ type (11) - summarize (22)
-
summary
_ indent (11) - tag (11)
検索結果
先頭5件
- Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] - Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String] - RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node - RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> ()
-
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String , Ripper :: Lexer :: State] (24701.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
Ripper
:: Lexer # parse -> [[Integer , Integer] , Symbol , String] (24601.0) -
自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た だし Ripper::Lexer#lex と違い、結果をソートしません。
...自身の持つ Ruby プログラムをトークンに分割し、そのリストを返します。た
だし Ripper::Lexer#lex と違い、結果をソートしません。
ライブラリ内部で使用します。... -
RubyVM
:: AbstractSyntaxTree . parse(string , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (21632.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを......際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-......# 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-... -
RubyVM
:: AbstractSyntaxTree . parse(string) -> RubyVM :: AbstractSyntaxTree :: Node (21432.0) -
文字列を抽象構文木にパースし、その木の根ノードを返します。
...tring パースする対象の Ruby のコードを文字列で指定します。
@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:9 (LIT@1:4-1:5 1) :+ (LIST@1:8-1:9 (LIT@1:8-1:9 2) nil))))
//}......文木にパースし、その木の根ノードを返します。
@param string パースする対象の Ruby のコードを文字列で指定します。
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを......際にエラー箇所を type が :ERROR であるようなノードに置き換えてツリーを生成します。
@raise SyntaxError string が Ruby のコードとして正しくない場合に発生します。
//emlist[][ruby]{
pp RubyVM::AbstractSyntaxTree.parse("x = 1 + 2")
# => (SCOPE@1:0-......# 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-... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (15418.0) -
サマリを指定された to へと加えていきます。
...m width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")......opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (15418.0) -
サマリを指定された to へと加えていきます。
...m width サマリの幅を整数で指定します。
@param max サマリの最大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")......opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n", " -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\... -
OptionParser
# summary _ indent -> String (15418.0) -
サマリを表示する時のインデントを文字列で返します。
...ist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary......_indent = " "
opts.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}... -
RubyVM
:: AbstractSyntaxTree . parse _ file(pathname , keep _ script _ lines: false , error _ tolerant: false , keep _ tokens: false) -> RubyVM :: AbstractSyntaxTree :: Node (15414.0) -
pathname のファイルを読み込み、その内容を抽象構文木にパースし、その木の根ノードを返します。
...根ノードを返します。
@param pathname パースする対象のファイルパスを指定します
@param keep_script_lines true を指定すると、 Node#script_lines でノードと関連づけられたソースコードのテキストを取得できます。
@param keep_tokens true を......を type が :ERROR であるようなノードに置き換えてツリーを生成します。
@raise SyntaxError pathname から取得された文字列が Ruby のコードとして正しくない場合に発生します。
//emlist[][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)
# :parse_file (LIST@1:41-1:49 (STR@1:41-1:49 "") nil)) nil)))
//}... -
Psych
:: ScalarScanner # parse _ time(string) -> Time (15401.0) -
文字列を Time オブジェクトに変換します。
...文字列を Time オブジェクトに変換します。
@param string 変換文字列... -
URI
:: Generic # query -> String | nil (15306.0) -
自身の query を文字列で返します。設定されていない場合は nil を返します。
...自身の query を文字列で返します。設定されていない場合は nil を返します。
例:
require 'uri'
p URI.parse('http://example.com/?hoge').query #=> "hoge"... -
Net
:: HTTPGenericRequest # request _ body _ permitted? -> bool (15206.0) -
リクエストにエンティティボディを一緒に送ることが許されている HTTP メソッド (POST など)の場合真を返します。
...場合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.request_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.request_body_permitted? # => false
//}... -
Net
:: HTTPGenericRequest # response _ body _ permitted? -> bool (15206.0) -
サーバからのレスポンスにエンティティボディを含むことが許されている HTTP メソッド (GET, POST など)の場合真を返します。
...合真を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
post.response_body_permitted? # => true
head = Net::HTTP::Head.new(uri.request_uri)
head.response_body_permitted? # => false
//}... -
Net
:: HTTPHeader # main _ type -> String|nil (12406.0) -
"text/html" における "text" のようなタイプを表す 文字列を返します。
...タイプを表す
文字列を返します。
Content-Type: ヘッダフィールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/index.html')
res = Net::HTTP.get_response(uri)
res.main_type # => "text"
//}...