るりまサーチ

最速Rubyリファレンスマニュアル検索!
242件ヒット [1-100件を表示] (0.052秒)

別のキーワード

  1. socket mcast_exclude
  2. _builtin exclude_end?
  3. range exclude_end?
  4. rake exclude
  5. filelist exclude

ライブラリ

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Range#end -> object (18103.0)

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま せん。

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま
せん。

//emlist[例][ruby]{
(10..20).last # => 20
(10...20).last # => 20
//}

@see Range#begin

Range#exclude_end? -> bool (12226.0)

範囲オブジェクトが終端を含まないとき真を返します。

...範囲オブジェクトが終端を含まないとき真を返します。

//emlist[例][ruby]{
(1..5).exclude_end? # => false
(1...5).exclude_end? # => true
//}...

Enumerator::ArithmeticSequence#exclude_end? -> bool (12202.0)

末項(終端)を含まないとき真を返します。

末項(終端)を含まないとき真を返します。

Rake::FileList#clear_exclude -> self (6119.0)

登録されている除外リストをクリアします。

...する

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test.rb", "test.bak")
file_list.exclude("test.rb")
# DEFAULT_IGNORE_PATTERNS と "test.rb" の双方の除外がクリアされる
file_list.clear_exclude
file_list # => ["test.rb", "test.bak"]
end

//}...

Rake::FileList#excluded_from_list?(file_name) -> bool (6112.0)

与えられたファイル名が除外される場合は、真を返します。 そうでない場合は偽を返します。

...st1.rb", "test")
IO.write("test2.rb", "test")

task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb")
file_list.exclude("test1.rb")
file_list.excluded_from_list?("test1.rb") # => true
file_list.excluded_from_list?("test2.rb") # => false
end

//}...

絞り込み条件を変える

Range#last(n) -> [object] (3013.0)

最後の n 要素を返します。範囲内に要素が含まれない場合は空の配列を返します。

...に負の数を指定した場合に発生します。

[注意] 引数を省略して実行した場合は、終端を含むかどうか
(Range#exclude_end? の戻り値)に関わらず終端の要素を返す事に注意し
てください。

//emlist[例][ruby]{
(10..20).last(3) # => [18, 19,...

Range#last -> object (3003.0)

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま せん。

終端の要素を返します。範囲オブジェクトが終端を含むかどうかは関係ありま
せん。

//emlist[例][ruby]{
(10..20).last # => 20
(10...20).last # => 20
//}

@see Range#begin

Range.new(first, last, exclude_end = false) -> Range (262.0)

first から last までの範囲オブジェクトを生成して返しま す。

...成して返しま
す。

exclude
_end が真ならば終端を含まない範囲オブジェクトを生
成します。exclude_end 省略時には終端を含みます。

@param first 最初のオブジェクト
@param last 最後のオブジェクト
@param exclude_end 真をセットした場...
...のオブジェクトの場合][ruby]{
MyInteger = Struct.new(:value) do
def succ
self.class.new(value + 1)
end


def <=>(other)
value <=> other.value
end


def to_s
value.to_s
end

end

Range.new(MyInteger.new(1), MyInteger.new(3)).each {|i| puts i }
# => 1
# 2
# 3
//}...

演算子式 (114.0)

演算子式 * assign * selfassign * multiassign * range * range_cond * and * or * not * cond

...出しに変換されます。

//emlist[例][ruby]{
class C
def initialize
@ary = [0,1,2,3,4,5,6,7]
end

def [](i)
@ary[i * 2]
end

def []=( i, v )
@ary[i * 2] = v
end

end

c = C.new
p c[3] # c.[]( 3 ) に変換され、その結果は 6
p c[3] = 1 # c.[]=(3,1) に変換...
...C
def foo
@foo
end

def foo=( v )
@foo = v
end

end

c = C.new
c.foo = 5 # c.foo=( 5 ) のように変換される
p c.foo # => 5
//}

属性は Module#attr を使って同じように定義できます。

//emlist[例][ruby]{
class C
attr :foo, true
end

c = C.new
c.foo = 5...
...せん。

終端を省略した Range は終端のない範囲を表現できます。
(1..) は (1..nil) の構文糖です。
(1...) とは exclude_end が違うため、オブジェクトとしては
等しくありませんが、ary[1..] と ary[1...] のように通常の
使い方では同じ...

rdoc (66.0)

RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。

...ィングに変換されま
す。--charset オプションもありますが --encoding オプションを使用して
ください。

: --exclude pattern

pattern にマッチするディレクトリおよびファイルを処理の対象から取り除きます。

: --extension new=old...
...ントも使え
ますし、=begin/=end でのコメントも使えます。=begin/=end を使う場合は、
以下のように =begin の行に 'rdoc' タグを付ける必要があります。

=begin rdoc
Documentation to
be processed by RDoc.
=end

パラグラフは左のインデン...
...したい場合は all 修飾
子を加えます。

//emlist{
module SM #:nodoc:
class Input
end

end

module Markup #:nodoc: all
class Output
end

end

//}

以上のコードでは、SM::Input のドキュメントのみが出力されます。

: :stopdoc...

絞り込み条件を変える

<< 1 2 3 > >>