るりまサーチ

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

別のキーワード

  1. array sample
  2. _builtin sample
  3. sample
  4. sample array
  5. sample random

検索結果

<< 1 2 3 > >>

Rake::PackageTask#name -> String (18119.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 (6320.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...

Rake::PackageTask#name=(name) (6238.0)

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

...

@param name パッケージの名前を指定します。

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

Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
package_task.name = "update"
package_task.name # => "upda...

Rake::NameSpace.new(task_manager, scope_list) (3024.0)

自身を初期化します。

...@param scope_list 名前空間のリストを指定します。

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

task default: :test_rake_app
task :test_rake_app do
name
_space = Rake::NameSpace.new(Rake.application, Rake::Scope.new("sample"))
name
_space.scope # => LL("sample")
end
//}...

NameError#receiver -> object (3018.0)

self が発生した時のレシーバオブジェクトを返します。

...lf が発生した時のレシーバオブジェクトを返します。

例:

class Sample
def foo
return "foo"
end
end

bar = Sample.new
begin
bar.bar
rescue NameError => err
p err.receiver # => #<Sample:0x007fd4d89b3110>
p err.receiver.foo # => "foo"
end...

絞り込み条件を変える

Pathname#split -> Array (3012.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 (3006.0)

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

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

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

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

Pathname#unlink -> Integer (3006.0)

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

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

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

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

Rake::FileList#egrep(pattern) {|filename, count, line| ... } (160.0)

与えられたパターンをファイルリストから grep のように検索します。

...ite("sample1", "line1\nline2\nline3\n")
IO.write("sample2", "line1\nline2\nline3\nline4\n")

task default: :test_rake_app
task :test_rake_app do

file_list = FileList.new('sample*')
file_list.egrep(/line/) # => 7

file_list.egrep(/.*/) do |filename, count, line|
"filename = #{filename}, co...
...# => "filename = sample1, count = 1, line = line1\n"
# => "filename = sample1, count = 2, line = line2\n"
# => "filename = sample1, count = 3, line = line3\n"
# => "filename = sample2, count = 1, line = line1\n"
# => "filename = sample2, count = 2, line = line2\n"
# => "filename = sample2, count =...
...3, line = line3\n"
# => "filename = sample2, count = 4, line = line4\n"
//}...
<< 1 2 3 > >>