るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

クラス

モジュール

キーワード

検索結果

Rake::PackageTask#name -> String (18226.0)

バージョン情報を含まないパッケージの名前を返します。

...バージョン情報を含まないパッケージの名前を返します。

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

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}...

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

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

...を評価します。

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

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

task default: :test_rake_app

name
space :sample do
def hoge
puts "hoge"
end
end

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

Pathname#split -> Array (3119.0)

File.split(self.to_s) と同じです。

...File.split(self.to_s) と同じです。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

Pathname#delete -> Integer (3113.0)

self が指すディレクトリあるいはファイルを削除します。

...self が指すディレクトリあるいはファイルを削除します。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}...

Pathname#unlink -> Integer (3113.0)

self が指すディレクトリあるいはファイルを削除します。

...self が指すディレクトリあるいはファイルを削除します。

//emlist[例][ruby]{
require "pathname"

pathname = Pathname("/path/to/sample")
pathname.exist? # => true
pathname.unlink # => 1
pathname.exist? # => false
//}...

絞り込み条件を変える

Rake::TaskManager#synthesize_file_task(task_name) -> Rake::FileTask | nil (238.0)

与えられたタスク名をもとにファイルタスクを合成します。

...与えられたタスク名をもとにファイルタスクを合成します。

@param task_name タスク名を指定します。

@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場...
.../emlist[][ruby]{
# Rakefile での記載例とする

task default: :test_rake_app

task :test_rake_app do |task|
task.application.synthesize_file_task("sample_file") # => nil
IO.write("sample_file", "")
task.application.synthesize_file_task("sample_file") # => <Rake::FileTask sample_file => [...

Rake::TaskManager#intern(task_class, task_name) -> Rake::Task (226.0)

タスクを検索します。

..._name タスクの名前を指定します。

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

task default: :test_rake_app

task :test_rake_app do |task|
task.application.intern(Rake::Task, "test_rake_app") # => <Rake::Task test_rake_app => []>
task.application.intern(Rake::Task, "sample...
..._task") # => <Rake::Task sample_task => []>
end
//}...

Object#respond_to_missing?(symbol, include_private) -> bool (185.0)

自身が symbol で表されるメソッドに対し BasicObject#method_missing で反応するつもりならば真を返します。

...e private method も含めたい場合に true が渡されます

//emlist[例][ruby]{
class Sample
def method_missing(name, *args)
if name =~ /^to_*/
[name, *args] # => [:to_sample, "sample args1", "sample args2"]
return
else
super
end
end

def respond_to_missin...
...g?(sym, include_private)
(sym =~ /^to_*/) ? true : super
end
end

s = Sample.new
s.to_sample("sample args1", "sample args2")
s.respond_to?(:to_sample) # => true
s.respond_to?(:sample) # => false
//}

@see Object#respond_to?, BasicObject#method_missing...