294件ヒット
[1-100件を表示]
(0.103秒)
種類
- インスタンスメソッド (239)
- 特異メソッド (44)
- 文書 (11)
モジュール
- Psych (22)
キーワード
- == (11)
- canonname (11)
-
clear
_ exclude (11) - egrep (11)
-
excluded
_ from _ list? (11) - existing (11)
- existing! (11)
- ext (11)
- gsub! (11)
- import (11)
-
is
_ a? (11) -
kind
_ of? (11) -
load
_ stream (22) - new (22)
- pack (19)
- pack テンプレート文字列 (11)
- pathmap (11)
- resolve (11)
-
respond
_ to? (11) - sub! (11)
-
to
_ a (11) -
to
_ ary (11) -
to
_ s (11) - unpack (11)
検索結果
先頭5件
-
Rake
:: FileList # existing -> Rake :: FileList (6206.0) -
自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含む Rake::FileList を返します。
...む Rake::FileList を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.existing # => ["test... -
Rake
:: FileList # excluded _ from _ list?(file _ name) -> bool (6106.0) -
与えられたファイル名が除外される場合は、真を返します。 そうでない場合は偽を返します。
...ile_name ファイル名を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb")
file_list.exclude("test1.rb")
fi......le_list.excluded_from_list?("test1.rb") # => true
file_list.excluded_from_list?("test2.rb") # => false
end
//}... -
Rake
:: FileList # existing! -> self (6106.0) -
自身に含まれるファイルのうちファイルシステムに存在するファイルのみを 含むように自身を変更して返します。
...//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.existing! # => ["test1.rb", "test2.rb"]
file_list... -
Rake
:: FileList # import(array) -> self (6106.0) -
与えられた配列を自身にインポートします。
...トを指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("test1.rb", "test")
IO.write("test2.rb", "test")
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.import(["test4.rb", "test5.rb"])......# => ["test4.rb", "test5.rb", "test1.rb", "test2.rb", "test3.rb"]
file_list # => ["test4.rb", "test5.rb", "test1.rb", "test2.rb", "test3.rb"]
end
//}... -
Rake
:: FileList # is _ a?(klass) -> bool (6106.0) -
自身に Array のフリをさせます。
...自身に Array のフリをさせます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}... -
Rake
:: FileList # kind _ of?(klass) -> bool (6106.0) -
自身に Array のフリをさせます。
...自身に Array のフリをさせます。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.is_a?(Array) # => true
file_list.is_a?(String) # => false
end
//}... -
Rake
:: FileList # pathmap(spec = nil) -> Rake :: FileList (3206.0) -
各要素に String#pathmap を適用した新しい Rake::FileList を返します。
...各要素に String#pathmap を適用した新しい Rake::FileList を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new("test1.rb", "test2.rb", "test3.rb")
file_list.pathmap("%n") # => ["test1",......"test2", "test3"]
end
//}
@see String#pathmap... -
String
# unpack(template) -> Array (3156.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...@param template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることができます......を表すこともできます。
長さの意味はテンプレート文字により異なりますが大抵、
"iiii"
のように連続するテンプレート文字は
"i4"
と書き換えることができます。
テンプレート文字列中の空白類は無視されます。
また......の signed long(その2)
//emlist[][ruby]{
s = "\xFF\xFF\xFF\xFE"
n = s.unpack("N").pack("l").unpack("l")[0]
n # => -2
//}
: IPアドレス
//emlist[][ruby]{
require 'socket'
official_hostname, alias_hostnames, address_family, *address_list = Socket.gethostbyname("localhost")
address_list.find {|ad......m template pack テンプレート文字列
@return オブジェクトの配列
以下にあげるものは、Array#pack、String#unpack、String#unpack1
のテンプレート文字の一覧です。テンプレート文字は後に「長さ」を表す数字
を続けることがで... -
Addrinfo
# canonname -> String|nil (3106.0) -
カノニカル名を文字列で返します。
...には nil を返します。
カノニカル名は Addrinfo.getaddrinfo に Socket::AI_CANONINAME
を指定した場合にセットされます。
require 'socket'
list = Addrinfo.getaddrinfo("www.ruby-lang.org", 80, :INET, :STREAM, nil, Socket::AI_CANONNAME)
p list[0] #=> #<Addrinfo: 221.......186.184.68:80 TCP carbon.ruby-lang.org (www.ruby-lang.org:80)>
p list[0].canonname #=> "carbon.ruby-lang.org"... -
Rake
:: FileList # egrep(pattern) {|filename , count , line| . . . } (3106.0) -
与えられたパターンをファイルリストから grep のように検索します。
...//emlist[][ruby]{
# Rakefile での記載例とする
IO.write("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(/.......|filename, count, line|
"filename = #{filename}, count = #{count}, line = #{line}"
end
end
# => "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"
//}...