596件ヒット
[1-100件を表示]
(0.166秒)
別のキーワード
ライブラリ
- ビルトイン (224)
-
irb
/ context (12) - mkmf (12)
-
net
/ http (36) - optparse (84)
- pathname (12)
- rake (192)
-
ripper
/ filter (12) - win32ole (12)
クラス
-
ARGF
. class (12) - Hash (108)
-
IRB
:: Context (12) - Integer (24)
- Module (12)
- OptionParser (84)
- Pathname (12)
-
Rake
:: FileList (60) -
Rake
:: InvocationChain (24) -
Rake
:: TaskArguments (36) -
Ripper
:: Filter (12) - String (36)
- Thread (8)
- ThreadGroup (12)
-
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (12)
- Kernel (12)
-
Net
:: HTTPHeader (36) -
Rake
:: TaskManager (72)
キーワード
- == (12)
- [] (36)
- add (12)
- append (12)
-
arg
_ config (12) - chr (24)
- chunk (12)
-
default
_ argv (12) -
default
_ event _ sources (12) -
default
_ proc (12) -
define
_ task (12) - encode (36)
-
excluded
_ from _ list? (12) - ext (12)
- fetch (80)
- getopts (24)
- import (12)
-
in
_ namespace (12) - intern (12)
-
internal
_ encoding (12) - lookup (12)
- member? (12)
-
new
_ scope (12) - order! (24)
- parse (12)
- parse! (12)
- pathmap (12)
- permute! (12)
-
prompt
_ mode (12) - public (12)
- shift (12)
-
synthesize
_ file _ task (12) -
values
_ at (12) -
with
_ defaults (12)
検索結果
先頭5件
-
Hash
# default -> object | nil (24517.0) -
ハッシュのデフォルト値を返します。
...るには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と引数 key をブロックに渡して評価し、その結果を返します。
@param key デフォルトのブロ......emlist[例][ruby]{
h = Hash.new("default")
p h.default #=> "default"
p h.default(:some) #=> "default"
p h #=>{}
h = Hash.new{|hash, key| hash[key] ="default" }
p h.default #=> nil
p h.default(:some) #=> "default"
p h #=> {:some=>"default"}
h = Hash.new
p h.default......#=> nil
p h.default(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
Hash
# default(key) -> object | nil (24417.0) -
ハッシュのデフォルト値を返します。
...るには 2 番目の形式か Hash#default_proc を使ってください。
2 番目の形式はハッシュがデフォルト値としてブロックを持つ場合に、
self と引数 key をブロックに渡して評価し、その結果を返します。
@param key デフォルトのブロ......emlist[例][ruby]{
h = Hash.new("default")
p h.default #=> "default"
p h.default(:some) #=> "default"
p h #=>{}
h = Hash.new{|hash, key| hash[key] ="default" }
p h.default #=> nil
p h.default(:some) #=> "default"
p h #=> {:some=>"default"}
h = Hash.new
p h.default......#=> nil
p h.default(:some) #=> nil
p h #=> {}
//}
@see Hash#default=, Hash#default_proc... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (15810.0) -
型が持つソースインターフェイスを取得します。
...ます。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。
@return デフ......TYPEの配列と
して返します。返すのは配列ですが、デフォルトのソースインターフェ
イスは最大でも1インターフェイスです。ソースインターフェイスを持
たない場合は空配列を返します。
tobj = WIN32OLE_T......YPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]
WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたインターフェイスが選択されます。
次のサンプル... -
Rake
:: TaskArguments # with _ defaults(defaults) -> Hash (12461.0) -
パラメータにデフォルト値をセットします。
...セットします。
@param defaults デフォルト値として使用するキーと値を格納したハッシュを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
arguments = Rake::TaskArguments.new(["name1", "name......ents.to_hash # => {:name1=>"value1", :name2=>"value2"}
arguments.with_defaults({ default_key: "default_value"}) # => {:default_key=>"default_value", :name1=>"value1", :name2=>"value2"}
arguments.to_hash # => {:default_......key=>"default_value", :name1=>"value1", :name2=>"value2"}
end
//}... -
Hash
# default _ proc -> Proc | nil (12362.0) -
ハッシュのデフォルト値を返す Proc オブジェクトを返します。 ハッシュがブロック形式のデフォルト値を持たない場合 nil を返します。
...ist[例][ruby]{
h = Hash.new {|hash, key| "The #{key} not exist in #{hash.inspect}"}
p h.default #=> nil
p block = h.default_proc #=> #<Proc:0x0x401a9ff4>
p block.call({},:foo) #=> "The foo not exist in {}"
h = Hash.new("default")
p h.default #=> "default"
p h.default_p......roc #=> nil
//}
@see Hash#default... -
OptionParser
# default _ argv -> [String] (12326.0) -
自身がデフォルトでパースする引数を文字列の配列で返します。
...返します。
@param argv デフォルトでパースする文字列の配列を返します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new
# --hoo param1 --bar param2 をパラメーターに指定して実行
opts.default_argv # => ["--foo", "param1", "--bar", "param2"]
/... -
Rake
:: TaskManager # define _ task(task _ class , *args) { . . . } -> Rake :: Task (9443.0) -
タスクを定義します。
...
@param task_class タスククラスを指定します。
@param args タスクに渡すパラメータを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.define_task(Rake::Task, :t) # => <Rake::Task... -
Pathname
# expand _ path(default _ dir = & # 39; . & # 39;) -> Pathname (9438.0) -
Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。
@param default_dir self が相対パスであれば default_dir を基準に展開されます。
//emlist[例][ruby]{
require "pathname"
path = Pathname("testfile")
Pathname.pwd # => #<Pathname:/path/to>
path.expand_......path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}
@see File.expand_path... -
Rake
:: TaskManager # synthesize _ file _ task(task _ name) -> Rake :: FileTask | nil (9237.0) -
与えられたタスク名をもとにファイルタスクを合成します。
...合成します。
@param task_name タスク名を指定します。
@return 与えられたタスク名と同名のファイルが存在する場合は、ファイルタスクを作成して返します。
そうでない場合は nil を返します。
@raise RuntimeError タスクを......。
//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_fil...