490件ヒット
[1-100件を表示]
(0.196秒)
別のキーワード
クラス
- Array (12)
- CSV (144)
-
Encoding
:: Converter (60) - IO (36)
-
Psych
:: Visitors :: YAMLTree (12) - Regexp (36)
- Ripper (12)
-
RubyVM
:: InstructionSequence (46) - String (12)
モジュール
- JSON (24)
-
JSON
:: Generator :: GeneratorMethods :: String :: Extend (12) - Psych (36)
- RbConfig (24)
- URI (24)
キーワード
- [] (12)
-
asciicompat
_ encoding (24) - binread (12)
- compile (12)
-
compile
_ option (12) -
create
_ id (12) -
decode
_ www _ form _ component (12) - disasm (12)
- disassemble (12)
- dump (24)
-
encode
_ www _ form _ component (12) - filter (36)
- generate (12)
-
generate
_ line (12) - instance (24)
-
json
_ create (12) - lex (12)
-
load
_ from _ binary _ extra _ data (10) - new (72)
- open (48)
-
to
_ json (12) -
try
_ convert (24) - union (12)
- write (24)
検索結果
先頭5件
-
RbConfig
. ruby -> String (27436.0) -
ruby コマンドのフルパスを返します。
...
ruby コマンドのフルパスを返します。... -
String
. try _ convert(obj) -> String | nil (24442.0) -
obj を String に変換しようと試みます。変換には Object#to_str メソッ ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ た場合は nil が返されます。
...obj を String に変換しようと試みます。変換には Object#to_str メソッ
ドが使われます。変換後の文字列を返すか、何らかの理由により変換できなかっ
た場合は nil が返されます。
@param obj 変換する任意のオブジェクト
@return......変換後の文字列または nil
//emlist[例][ruby]{
String.try_convert("str") # => "str"
String.try_convert(/re/) # => nil
//}... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend . json _ create(hash) -> String (21340.0) -
JSON のオブジェクトから Ruby の文字列を生成して返します。
...JSON のオブジェクトから Ruby の文字列を生成して返します。
@param hash キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
require 'json'
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "A... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (21225.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
...//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option
# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructions_unification=>false,
# :stack_caching=>......false,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}
@see RubyVM::InstructionSequence.compile_option=... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (18314.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
...埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary... -
URI
. decode _ www _ form _ component(str , enc=Encoding :: UTF _ 8) -> String (12350.0) -
URL-encoded form data の文字列の各コンポーネント をデコードした文字列を返します。
...URL-encoded form data の文字列の各コンポーネント
をデコードした文字列を返します。
通常は URI.decode_www_form を使うほうがよいでしょう。
"+" という文字は空白文字にデコードします。
enc で指定したエンコーディングの文字......ます。
このメソッドは
https://www.w3.org/TR/html5/sec-forms.html#urlencoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
enc = URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%83%......ecode_www_form_component(enc)
# => "Ruby リファレンスマニュアル"
//}
@param str デコード対象の文字列
@param enc エンコーディング
@raise ArgumentError str のフォーマットが不正である場合に発生します
@see URI.encode_www_form_component, URI.decode_www_f... -
URI
. encode _ www _ form _ component(str , enc=nil) -> String (12338.0) -
文字列を URL-encoded form data の1コンポーネント としてエンコードした文字列を返します。
...文字列を URL-encoded form data の1コンポーネント
としてエンコードした文字列を返します。
通常は URI.encode_www_form を使うほうがよいでしょう。
このメソッドでは *, -, ., 0-9, A-Z, _, a-z, は変換せず、
空白は + に変換し、その他......。
このメソッドは
https://www.w3.org/TR/2013/CR-html5-20130806/forms.html#url-encoded-form-data
にもとづいて実装されています。
//emlist[][ruby]{
require 'uri'
p URI.encode_www_form_component('Ruby リファレンスマニュアル')
# => "Ruby+%E3%83%AA%E3%83%95%E3%82%A1%E3%......%83%B3%E3%82%B9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB"
//}
@param str エンコードする文字列
@param enc 指定された場合、パーセントエンコーディングする前に、strをこのエンコーディングに変換
@see URI.decode_www_form_component, URI.encode_www_form... -
Psych
. to _ json(o) -> String (12334.0) -
Ruby のオブジェクト o を JSON の文字列に変換します。
...Ruby のオブジェクト o を JSON の文字列に変換します。
@param o 変換対象となるオブジェクト... -
Array
. try _ convert(obj) -> Array | nil (12225.0) -
to_ary メソッドを用いて obj を配列に変換しようとします。
...to_ary メソッドを用いて obj を配列に変換しようとします。
何らかの理由で変換できないときには nil を返します。
このメソッドは引数が配列であるかどうかを調べるために使えます。
//emlist[例][ruby]{
Array.try_convert([1]) # =>......[1]
Array.try_convert("1") # => nil
if tmp = Array.try_convert(arg)
# the argument is an array
elsif tmp = String.try_convert(arg)
# the argument is a string
end
//}...