種類
- 特異メソッド (121)
- インスタンスメソッド (22)
- 文書 (11)
- ライブラリ (11)
ライブラリ
- erb (11)
- rake (33)
-
rake
/ packagetask (11) - uri (88)
クラス
- ERB (11)
-
Rake
:: Application (11) -
Rake
:: PackageTask (11) -
URI
:: FTP (33) -
URI
:: HTTP (33) -
URI
:: LDAP (11) -
URI
:: MailTo (11)
モジュール
- Rake (11)
- RakeFileUtils (11)
キーワード
- application= (11)
- new (66)
-
ruby 1
. 8 . 4 feature (11) - tsort (11)
-
when
_ writing (11)
検索結果
先頭5件
-
URI
:: FTP . build(ary) -> URI :: FTP (18138.0) -
引数で与えられた URI 構成要素から URI::FTP オブジェクトを生成します。 引数の正当性を検査します。
...引数の正当性を検査します。
例:
require 'uri'
p URI::FTP.build([nil, "www.example.com", 10020, "/path", 'a'])
#=> #<URI::FTP:0x201c4f9c URL:ftp://www.example.com:10020/path;type=a>
p URI::FTP.build({:host => "www.example.com", :path => "/path", :typecode => 'a'})
#=> #<......URI::FTP:0x201bd9cc URL:ftp://www.example.com/path;type=a>
p URI::FTP.build([nil, 'example.com', nil, '/foo', 'i']).to_s
#=> 'ftp://example.com/%2Ffoo;type=i'
@param ary 構成要素を表す文字列の配列を与えます。要素は
//emlist{
[userinfo, host, port, path, typecode]... -
URI
:: FTP . build(hash) -> URI :: FTP (18138.0) -
引数で与えられた URI 構成要素から URI::FTP オブジェクトを生成します。 引数の正当性を検査します。
...引数の正当性を検査します。
例:
require 'uri'
p URI::FTP.build([nil, "www.example.com", 10020, "/path", 'a'])
#=> #<URI::FTP:0x201c4f9c URL:ftp://www.example.com:10020/path;type=a>
p URI::FTP.build({:host => "www.example.com", :path => "/path", :typecode => 'a'})
#=> #<......URI::FTP:0x201bd9cc URL:ftp://www.example.com/path;type=a>
p URI::FTP.build([nil, 'example.com', nil, '/foo', 'i']).to_s
#=> 'ftp://example.com/%2Ffoo;type=i'
@param ary 構成要素を表す文字列の配列を与えます。要素は
//emlist{
[userinfo, host, port, path, typecode]... -
URI
:: HTTP . build(ary) -> URI :: HTTP (18126.0) -
引数で与えられた URI 構成要素から URI::HTTP オブジェクトを生成します。 引数の正当性を検査します。
...ずれかです。
@raise URI::InvalidComponentError 各要素が適合しない場合に発生します。
例:
require 'uri'
newuri = URI::HTTP.build({:host => 'www.example.com', :path => '/foo/bar'})
newuri = URI::HTTP.build([nil, "www.example.com", nil, "/path", "query", 'fragment'])... -
URI
:: HTTP . build(hash) -> URI :: HTTP (18126.0) -
引数で与えられた URI 構成要素から URI::HTTP オブジェクトを生成します。 引数の正当性を検査します。
...ずれかです。
@raise URI::InvalidComponentError 各要素が適合しない場合に発生します。
例:
require 'uri'
newuri = URI::HTTP.build({:host => 'www.example.com', :path => '/foo/bar'})
newuri = URI::HTTP.build([nil, "www.example.com", nil, "/path", "query", 'fragment'])... -
ERB
. new(str , safe _ level=nil , trim _ mode=nil , eoutvar=& # 39; _ erbout& # 39;) -> ERB (220.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...除されました。
trim_mode と eoutvar の指定はキーワード引数に移行してください。
//emlist[例][ruby]{
require "erb"
# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",......cost => 9.95 }
attr_reader :product, :price
def initialize( product = "", price = "" )
@product = product
@price = price
end
def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<-'END_PRODUCT'.gsub(/^\s+/, ""), 0, "", "@product").re......DUCT[:name] %> -- <%= PRODUCT[:cost] %>
<%= PRODUCT[:desc] %>
END_PRICE
end
end
# setup template data
listings = Listings.new
listings.build
puts listings.product + "\n" + listings.price
# Chicken Fried Steak
# A well messages pattie, breaded and fried.
#
# Chicken Fried Steak -- 9.9... -
Rake
:: PackageTask . new(name = nil , version = nil) {|t| . . . } -> Rake :: PackageTask (208.0) -
自身を初期化してタスクを定義します。
...task.package_dir = "./pkg"
package_task.package_files.include("lib/**/*")
end
# rake -T を実行すると以下になる
# => rake clobber_package # Remove package products
# rake package # Build all the packages
# rake repackage # Force a rebuild of the package files
//}... -
ERB
. new(str , safe _ level=NOT _ GIVEN , trim _ mode=NOT _ GIVEN , eoutvar=NOT _ GIVEN , trim _ mode: nil , eoutvar: & # 39; _ erbout& # 39;) -> ERB (119.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...除されました。
trim_mode と eoutvar の指定はキーワード引数に移行してください。
//emlist[例][ruby]{
require "erb"
# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",......cost => 9.95 }
attr_reader :product, :price
def initialize( product = "", price = "" )
@product = product
@price = price
end
def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<~'END_PRODUCT', eoutvar: "@product").result b
<%......DUCT[:name] %> -- <%= PRODUCT[:cost] %>
<%= PRODUCT[:desc] %>
END_PRICE
end
end
# setup template data
listings = Listings.new
listings.build
puts listings.product + "\n" + listings.price
# Chicken Fried Steak
# A well messages pattie, breaded and fried.
#
# Chicken Fried Steak -- 9.9... -
ERB
. new(str , trim _ mode: nil , eoutvar: & # 39; _ erbout& # 39;) -> ERB (119.0) -
eRubyスクリプト から ERB オブジェクトを生成して返します。
...ERB を使うときに変更
します。通常は指定する必要はありません。
//emlist[例][ruby]{
require "erb"
# build data class
class Listings
PRODUCT = { :name => "Chicken Fried Steak",
:desc => "A well messages pattie, breaded and fried.",......cost => 9.95 }
attr_reader :product, :price
def initialize( product = "", price = "" )
@product = product
@price = price
end
def build
b = binding
# create and run templates, filling member data variables
ERB.new(<<~'END_PRODUCT', eoutvar: "@product").result b
<%......DUCT[:name] %> -- <%= PRODUCT[:cost] %>
<%= PRODUCT[:desc] %>
END_PRICE
end
end
# setup template data
listings = Listings.new
listings.build
puts listings.product + "\n" + listings.price
# Chicken Fried Steak
# A well messages pattie, breaded and fried.
#
# Chicken Fried Steak -- 9.9... -
RakeFileUtils
# when _ writing(msg = nil) { . . . } (107.0) -
RakeFileUtils.nowrite_flag が真である場合与えられたブロックを実行せずに、 与えられたメッセージを表示します。
...れたブロックを実行せずに、
与えられたメッセージを表示します。
そうでない場合は、与えられたブロックを実行します。
@param msg 表示するメッセージを指定します。
例:
when_writing("Building Project") do
project.build
end... -
Rake
. application=(app) (36.0) -
現在の Rake アプリケーションをセットします。
...nil,
# @loaders=
# {".rb"=>#<Rake::DefaultLoader:0x00005624e6c30bc0>,
# ".rf"=>#<Rake::DefaultLoader:0x00005624e6c30b48>,
# ".rake"=>#<Rake::DefaultLoader:0x00005624e6c30a80>},
# @name="rake",
# @options=
# #<OpenStruct always_multitask=false, backtrace=false, build......_prereqs=false, show_task_pattern=nil, show_tasks=nil, silent=false, suppress_backtrace_pattern=nil, thread_pool_size=20, trace=false, trace_output=#<IO:<STDERR>>, trace_rules=false>,
# @original_dir="/path/to/dir",
# @pending_imports=[],
# @rakefile=nil,
# @rakefiles=["rakefile", "R... -
tsort (36.0)
-
tsort はトポロジカルソートと強連結成分に関するモジュールを提供します。
...(outputs, inputs=[], &block)
triple = [outputs, inputs, block]
outputs.each {|f| @dep[f] = [triple]}
@dep[triple] = inputs
end
def build(target)
each_strongly_connected_component_from(target) {|ns|
if ns.length != 1
fs = ns.delete_if {|n| Array === n}
raise......f| File.mtime f}.min
rescue Errno::ENOENT
outputs_time = nil
end
if outputs_time == nil ||
inputs_time != nil && outputs_time <= inputs_time
sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call
end......ule(%w[t3]) { command 'date > t3' }
m.rule(%w[t4], %w[t1 t3]) { command 'cat t1 t3 > t4' }
m.rule(%w[t5], %w[t4 t2]) { command 'cat t4 t2 > t5' }
m.build('t5')
//}
=== Bugs
tsort という名前は正確ではありません。なぜなら
このライブラリは Tarjan の強連結成分に関... -
URI
:: FTP . new(scheme , userinfo , host , port , registry , path , opaque , query , fragment , arg _ check = false) -> URI :: FTP (28.0) -
汎用的な構成要素から URI::FTP オブジェクトを生成します。build と異なり、デフォルトでは引数の正当性を検査しません。
...汎用的な構成要素から URI::FTP オブジェクトを生成します。build
と異なり、デフォルトでは引数の正当性を検査しません。
例:
require 'uri'
p ftp = URI.parse("ftp://ftp.ruby-lang.org/pub/ruby/;type=d")
p ftp.typecode
#=> #<URI::FTP:0x2010029c URL:......す。
@param host 構成要素を表す文字列を与えます。
@param port 構成要素を表す文字列を与えます。
@param registry nil を与えます。
@param path 構成要素を表す文字列を与えます。
@param opaque 構成要素を表す文字列を与えます。
@p......否かを検査します。適合しな い場合は例外 URI::InvalidComponentError が起ります。
@raise URI::InvalidURIError registry に nil 以外を与えた時に発生します。引数の正当性は、これ以外 デフォルトでは検査しません。
@raise URI::InvalidCompone...