るりまサーチ

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

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. rexml tag_end

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Rake::TaskArguments#names -> Array (18114.0)

パラメータ名のリストを返します。

...パラメータ名のリストを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name2"], ["value1", "value2"])
arguments.names # => ["name1", "name2"]
end

//}...

Kernel#namespace(name = nil) { ... } -> Rake::NameSpace (6207.0)

新しい名前空間を作成します。

...新しい名前空間を作成します。

与えられたブロックを評価する間は、その名前空間を使用します。

例:
ns = namespace "nested" do
task :run
end

task_run = ns[:run] # find :run in the given namespace.

@see Rake::TaskManager#in_namespace...

Rake::TaskManager#in_namespace(name) {|name_space| ... } -> Array (6125.0)

与えられた名前の名前空間でブロックを評価します。

...ます。

@param name 名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

names
pace :sample do
def hoge
puts "hoge"
end

end


task :test_rake_app do
task.application.in_namespace("sample") do
hoge # => "hoge"
end

end

//}...

IRB::ExtendCommand::Help#execute(*names) -> nil (3114.0)

RI から Ruby のドキュメントを参照します。

...Ruby のドキュメントを参照します。

irb(main):001:0> help String#match
...

@param names 参照したいクラス名やメソッド名などを文字列で指定します。

names
を指定しなかった場合は、RI を対話的なモードで起動します。メソッド
...

Rake::NameSpace#[](name) -> Rake::Task (3019.0)

与えられた名前のタスクを返します。

...のタスクを返します。

@param name タスクの名前を指定します。

//emlist[][ruby]{
# Rakefile での記載例とする

names
pace :ns do |ns|
task :ts1 do
end

task :ts2 do
end


ns[:ts1] # => <Rake::Task ns:ts1 => []>
ns[:ts2] # => <Rake::Task ns:ts2 => []>
end

//}...

絞り込み条件を変える

Rake::NameSpace#tasks -> Array (3019.0)

タスクのリストを返します。

...タスクのリストを返します。

//emlist[][ruby]{
# Rakefile での記載例とする

names
pace :ns do |ns|
task :ts1 do
end

task :ts2 do
end


ns.tasks # => [<Rake::Task ns:ts1 => []>, <Rake::Task ns:ts2 => []>]
end

//}...

Date#deconstruct_keys(array_of_names_or_nil) -> Hash (126.0)

パターンマッチに使用する名前と値の Hash を返します。

...h を返します。

キーに利用できる名前は以下の通りです。

* :year
* :month
* :day
* :yday
* :wday

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。...
...われます
puts "first Wednesday of the month"
end

#=> "first Wednesday of the month" が出力される

case d
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"
end

#=> "working day in month 10" が出力される...
...# クラスのチェックと組み合わせて利用することもできます
if d in Date(wday: 3, day: ..7)
puts "first Wednesday of the month"
end

//}

@see d:spec/pattern_matching#matching_non_primitive_objects...

DateTime#deconstruct_keys(array_of_names_or_nil) -> Hash (126.0)

パターンマッチに使用する名前と値の Hash を返します。

...下の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :sec_fraction
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。...
...deconstruct_keys が使われます
puts "Working time"
end

#=> "Working time" が出力される

case dt
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"
end

#=> "working day in month 10" が出力される

# ク...
...ラスのチェックと組み合わせて利用することもできます
if dt in DateTime(wday: 1..5, hour: 10..18, day: ..7)
puts "Working time, first week of the month"
end

//}

@see d:spec/pattern_matching#matching_non_primitive_objects...

Module#private(names) -> Array (126.0)

メソッドを private に設定します。

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

@raise NameError 存在しないメソッド名を指定した場合に発生します。

//emlist[例][ruby]{
class Foo
def foo1() 1 end # デフォルトでは public
pri...
...vate # 可視性を private に変更
def foo2() 2 end # foo2 は private メソッド
end


foo = Foo.new
p foo.foo1 # => 1
p foo.foo2 # => private method `foo2' called for #<Foo:0x401b7628> (NoMethodError)
//}...

Time#deconstruct_keys(array_of_names_or_nil) -> Hash (126.0)

パターンマッチに使用する名前と値の Hash を返します。

...の通りです。

* :year
* :month
* :day
* :yday
* :wday
* :hour
* :min
* :sec
* :subsec
* :dst
* :zone

@param array_of_names_or_nil パターンマッチに使用する名前の配列を指定します。nil の場合は全てをパターンマッチに使用します。...
...われます
puts "first Wednesday of the month"
end

#=> "first Wednesday of the month" が出力される

case t
in year: ...2022
puts "too old"
in month: ..9
puts "quarter 1-3"
in wday: 1..5, month:
puts "working day in month #{month}"
end

#=> "working day in month 10" が出力される...
...# クラスのチェックと組み合わせて利用することもできます
if t in Time(wday: 3, day: ..7)
puts "first Wednesday of the month"
end

//}

@see d:spec/pattern_matching#matching_non_primitive_objects...

絞り込み条件を変える

Data#deconstruct_keys(array_of_names_or_nil) -> Hash (120.0)

self のメンバの名前と値の組を Hash で返します。

...ay"
else
puts "Don't know how to handle it"
end

# "It is 10 kilometers away" が表示される

# 以下のようにも書ける
case distance
in Measure(amount:, unit: 'km')
puts "It is #{amount} kilometers away"
# ...
end

//}

@param array_of_names_or_nil 返り値に含めるメンバの名...

Module#private_class_method(names) -> self (120.0)

name で指定したクラスメソッド (クラスの特異メソッド) の 可視性を 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?(:foo) # => false
Foo.private_class_met...
<< 1 2 3 > >>