るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.117秒)
トップページ > クエリ:i[x] > クエリ:LITERAL[x] > 種類:特異メソッド[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

キーワード

検索結果

RubyVM::InstructionSequence.compile_option -> Hash (6113.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=>f...
...alse,
# :trace_instruction=>true,
# :frozen_string_literal=>false,
# :debug_frozen_string_literal=>false,
# :coverage_enabled=>true,
# :debug_level=>0}
//}

@see RubyVM::InstructionSequence.compile_option=...

Psych::Nodes::Scalar.new(value, anchor=nil, tag=nil, plain=true, quoted=false, style=ANY) -> Psych::Nodes:Scalar (207.0)

Scalar オブジェクトを生成します。

...で指定します。
anchor を付けない場合には nil を指定します。

tag には scalar に付加されている tag を文字列で指定します。
tag を付けない場合には nil を指定します。

plain は plain style であるかどうか、quoted は quoted style であ...
...es::Scalar::PLAIN
* Psych::Nodes::Scalar::SINGLE_QUOTED
* Psych::Nodes::Scalar::DOUBLE_QUOTED
* Psych::Nodes::Scalar::LITERAL
* Psych::Nodes::Scalar::FOLDED

@param value スカラー値
@param anchor 関連付けられた anchor の名前
@param tag タグ名
@param plain plain style であ...

Struct.new(*args, keyword_init: nil) -> Class (107.0)

Struct クラスに新しいサブクラスを作って、それを返します。

...//emlist[例][ruby]{
dog = Struct.new("Dog", :name, :age)
fred = dog.new("fred", 5)
fred.age = 6
printf "name:%s age:%d", fred.name, fred.age
#=> "name:fred age:6" を出力します
//}

実装の都合により、クラス名の省略は後づけの機能でした。
メンバ名に String を...
...名は Symbol で指定するのが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init true を指定すると、キーワード引数で初期化する構造体を定義します。
Rub...
...ください。

//emlist[例][ruby]{
Point = Struct.new(:x, :y, keyword_init: true) # => Point(keyword_init: true)
Point.new(x: 1, y: 2) # => #<struct Point x=1, y=2>
Point.new(x: 1) # => #<struct Point x=1, y=nil>
Point.new(y: 2) # => #<struct Point x=nil, y=2>
Point.new(z: 3) #...

Struct.new(*args, keyword_init: nil) {|subclass| block } -> Class (107.0)

Struct クラスに新しいサブクラスを作って、それを返します。

...//emlist[例][ruby]{
dog = Struct.new("Dog", :name, :age)
fred = dog.new("fred", 5)
fred.age = 6
printf "name:%s age:%d", fred.name, fred.age
#=> "name:fred age:6" を出力します
//}

実装の都合により、クラス名の省略は後づけの機能でした。
メンバ名に String を...
...名は Symbol で指定するのが無難です。

@param args 構造体を定義するための可変長引数。String または Symbol を指定します。
@param keyword_init true を指定すると、キーワード引数で初期化する構造体を定義します。
Rub...
...ください。

//emlist[例][ruby]{
Point = Struct.new(:x, :y, keyword_init: true) # => Point(keyword_init: true)
Point.new(x: 1, y: 2) # => #<struct Point x=1, y=2>
Point.new(x: 1) # => #<struct Point x=1, y=nil>
Point.new(y: 2) # => #<struct Point x=nil, y=2>
Point.new(z: 3) #...