るりまサーチ

最速Rubyリファレンスマニュアル検索!
580件ヒット [101-200件を表示] (0.213秒)

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

検索結果

<< < 1 2 3 4 ... > >>

JSON::Generator::GeneratorMethods::FalseClass#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "json"...
...false.to_json # => "false"
//}...

JSON::Generator::GeneratorMethods::Float#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "json"...
...(1.0).to_json # => "1.0"
//}...

JSON::Generator::GeneratorMethods::Hash#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...aram state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "json"

per...
...son = { "name" => "tanaka", "age" => 19 }
person.to_json # => "{\"name\":\"tanaka\",\"age\":19}"
//}...

JSON::Generator::GeneratorMethods::Integer#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...ram state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "json"

10.t...

JSON::Generator::GeneratorMethods::NilClass#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を
指定します。

//emlist[例][ruby]{
r
equire "json"...
...nil.to_json # => "null"
//}...

絞り込み条件を変える

JSON::Generator::GeneratorMethods::TrueClass#to_json(state_or_hash = nil) -> String (21308.0)

自身から生成した JSON 形式の文字列を返します。

...の文字列を返します。

"true" という文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を...
...指定します。

//emlist[例][ruby]{
r
equire "json"

t
rue.to_json # => "true"
//}...

Module#private_method_defined?(name, inherit=true) -> bool (18522.0)

インスタンスメソッド name がモジュールに定義されており、 しかもその可視性が private であるときに true を返します。 そうでなければ false を返します。

...ュールに定義されており、
しかもその可視性が private であるときに true を返します。
そうでなければ false を返します。

@param name Symbol か String を指定します。
@param inherit 真を指定するとスーパークラスや include したモジュ...
...method_defined?, Module#public_method_defined?, Module#protected_method_defined?

//emlist[例][ruby]{
module A
def method1() end
end
class B
private
def method2() end
end
class C < B
include A
def method3() end
end

A.method_defined? :method1 #=> true
C.private_method...
..._defined? "method1" #=> false
C.private_method_defined? "method2" #=> true
C.private_method_defined? "method2", true #=> true
C.private_method_defined? "method2", false #=> false
C.method_defined? "method2" #=> false
//}...

Module#remove_method(*name) -> self (18344.0)

インスタンスメソッド name をモジュールから削除します。

...します。

Ruby
1.8.0 以降は複数のメソッド名を指定して一度に削除できます。

@param name 0 個以上の String か Symbol を指定します。

@raise NameError 指定したメソッドが定義されていない場合に発生します。

//emlist[例][ruby]{
class C...
...def foo
end

r
emove_method :foo
r
emove_method :no_such_method # 例外 NameError が発生
end
//}

@see Module#undef_method...

Refinement#import_methods(*modules) -> self (18343.0)

モジュールからメソッドをインポートします。

...ポートします。

Module#includeと違って、import_methods はメソッドをコピーして
r
efinement に追加して、refinementでインポートしたメソッドを有効化します。

メソッドをコピーするため、Rubyコードで定義されたメソッドだけしか
...
...t[][ruby]{
module StrUtils
def indent(level)
' ' * level + self
end
end

module M
r
efine String do
import_methods StrUtils
end
end

using M
p "foo".indent(3) # => " foo"

module M
r
efine String do
import_methods Enumerable
# Can't import method which is not defined with R...
...uby code: Enumerable#drop
end
end
//}...

Module#private_class_method(*name) -> self (18339.0)

name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を private に変更します。

...性を private に変更します。

@param name 0 個以上の String または Symbol を指定します。
@param names 0 個以上の String または Symbol を Array で指定します。

//emlist[例][ruby]{
module Foo
def self.foo; end
end

Foo.singleton_class.private_method_defined?(:f...
...oo) # => false
Foo.private_class_method(:foo) # => Foo
Foo.singleton_class.private_method_defined?(:foo) # => true
//}...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>