別のキーワード
ライブラリ
- ビルトイン (14)
- json (176)
-
shell
/ command-processor (6)
クラス
- Module (11)
- Refinement (3)
-
Shell
:: CommandProcessor (6)
モジュール
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (11) -
JSON
:: Generator :: GeneratorMethods :: Float (11) -
JSON
:: Generator :: GeneratorMethods :: Hash (11) -
JSON
:: Generator :: GeneratorMethods :: Integer (11) -
JSON
:: Generator :: GeneratorMethods :: NilClass (11) -
JSON
:: Generator :: GeneratorMethods :: Object (11) -
JSON
:: Generator :: GeneratorMethods :: String (33) -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (11) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Extend (22)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - NoDelegateMethods (6)
- Ruby用語集 (11)
-
import
_ methods (3) - irb (11)
-
json
_ create (11) - rdoc (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 9 feature (11) -
to
_ json (99) -
to
_ json _ raw (11) -
to
_ json _ raw _ object (11) -
undef
_ method (11)
検索結果
先頭5件
-
JSON
:: Ext :: Generator :: GeneratorMethods :: String (24016.0) -
Alias of JSON::Generator::GeneratorMethods::String
...Alias of JSON::Generator::GeneratorMethods::String... -
JSON
:: Generator :: GeneratorMethods :: String (24016.0) -
String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。
...String に JSON で使用するインスタンスメソッドを追加するためのモジュールです。... -
Shell
:: CommandProcessor :: NoDelegateMethods -> [String] (12301.0) -
内部で使用する定数です。
内部で使用する定数です。 -
Refinement
# import _ methods(*modules) -> self (12237.0) -
モジュールからメソッドをインポートします。
...モジュールからメソッドをインポートします。
Module#includeと違って、import_methods はメソッドをコピーして
refinement に追加して、refinementでインポートしたメソッドを有効化します。
メソッドをコピーするため、Rubyコードで......dent(level)
' ' * level + self
end
end
module M
refine String do
import_methods StrUtils
end
end
using M
p "foo".indent(3) # => " foo"
module M
refine String do
import_methods Enumerable
# Can't import method which is not defined with Ruby code: Enumerable#drop
end
end... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw -> String (9123.0) -
自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
...自身に対して JSON::Generator::GeneratorMethods::String#to_json_raw_object を呼び出して JSON::Generator::GeneratorMethods::Hash#to_json した結果を返します。
@see JSON::Generator::GeneratorMethods::String#to_json_raw_object, JSON::Generator::GeneratorMethods::Hash#to_json... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend . json _ create(hash) -> String (9107.0) -
JSON のオブジェクトから Ruby の文字列を生成して返します。
...のオブジェクトから Ruby の文字列を生成して返します。
@param hash キーとして "raw" という文字列を持ち、その値として数値の配列を持つハッシュを指定します。
require 'json'
String.json_create({"raw" => [0x41, 0x42, 0x43]}) # => "ABC"... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json(state _ or _ hash = nil) -> String (9101.0) -
自身から生成した JSON 形式の文字列を返します。
自身から生成した JSON 形式の文字列を返します。
自身のエンコードは UTF-8 であるべきです。
"\u????" のように UTF-16 ビッグエンディアンでエンコードされた文字列を返すことがあります。
@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。
//emlist[例][ruby]... -
JSON
:: Ext :: Generator :: GeneratorMethods :: String :: Extend (9016.0) -
Alias of JSON::Generator::GeneratorMethods::String::Extend
...Alias of JSON::Generator::GeneratorMethods::String::Extend... -
JSON
:: Generator :: GeneratorMethods :: String :: Extend (9016.0) -
String に JSON で使用する特異メソッドを追加するためのモジュールです。
...String に JSON で使用する特異メソッドを追加するためのモジュールです。... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (9006.0) -
生の文字列を格納したハッシュを生成します。
...に変換する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::Generat... -
Module
# undef _ method(*name) -> self (6173.0) -
このモジュールのインスタンスメソッド name を未定義にします。
...このモジュールのインスタンスメソッド name を未定義にします。
@param name 0 個以上の String か Symbol を指定します。
@raise NameError 指定したインスタンスメソッドが定義されていない場合に発生します。
=== 「未定義にする......k
puts 'B'
end
end
B.new.ok # => B
# undef_method の場合はスーパークラスに同名のメソッドがあっても
# その呼び出しはエラーになる
class B
undef_method :ok
end
B.new.ok # => NameError
# remove_method の場合はスーパークラスに同名のメソ......ss B
remove_method :ok
end
B.new.ok # => A
//}
また、undef 文と undef_method の違いは、
メソッド名を String または Symbol で与えられることです。
//emlist[例][ruby]{
module M1
def foo
end
def self.moo
undef foo
end
end
M1.instance_methods false #=> ["f...