種類
- インスタンスメソッド (141)
- 文書 (17)
ライブラリ
- ビルトイン (33)
-
net
/ http (12) - rake (12)
-
rake
/ loaders / makefile (12) -
rdoc
/ parser / simple (12) -
rexml
/ document (12) - rss (48)
クラス
- Array (21)
-
RDoc
:: Parser :: Simple (12) -
REXML
:: Element (12) -
RSS
:: Maker :: ItemsBase :: ItemBase (24) -
RSS
:: Rss :: Channel :: Item (24) -
Rake
:: Application (12) -
Rake
:: MakefileLoader (12) - String (12)
モジュール
-
Net
:: HTTPHeader (12)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (5) -
add
_ loader (12) - comments= (24)
-
content
_ type (12) - load (12)
- pack (21)
- pack テンプレート文字列 (12)
-
remove
_ private _ comments (12) - unpack (12)
検索結果
先頭5件
-
String
# unpack(template) -> Array (12.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...F-16 とはいえない)
リトルエンディアン:
//emlist[][ruby]{
("Comments").unpack("U*").pack("v*") # => "C\x00o\x00m\x00m\x00e\x00n\x00t\x00s\x00"
//}
ビッグエンディアン:
//emlist[][ruby]{
("Comments").unpack("U*").pack("n*") # => "\x00C\x00o\x00m\x00m\x00e\x00n\x00t\x00s"
//... -
pack テンプレート文字列 (12.0)
-
pack テンプレート文字列
...F-16 とはいえない)
リトルエンディアン:
//emlist[][ruby]{
("Comments").unpack("U*").pack("v*") # => "C\x00o\x00m\x00m\x00e\x00n\x00t\x00s\x00"
//}
ビッグエンディアン:
//emlist[][ruby]{
("Comments").unpack("U*").pack("n*") # => "\x00C\x00o\x00m\x00m\x00e\x00n\x00t\x00s"
//... -
Net
:: HTTPHeader # content _ type -> String|nil (6.0) -
"text/html" のような Content-Type を表す 文字列を返します。
...ールドが存在しない場合には nil を返します。
//emlist[例][ruby]{
require 'net/http'
uri = URI.parse('http://www.example.com/comments.cgi?post=comment')
req = Net::HTTP::Post.new(uri.request_uri)
req.content_type # => nil
req.content_type = 'multipart/form-data'
req.content_type... -
Rake
:: Application # add _ loader(ext , loader) (6.0) -
与えられた拡張子で終わるファイル名のファイルをロードするためのローダーを 自身に追加します。
...[ruby]{
require "rake/loaders/makefile"
# Rakefile での記載例とする
task default: :test
task :test
makefile =<<-EOS
<< <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
EOS
IO.write("sample.mf", makefile)
Rake.application.add_loader("mf", Rake::MakefileLoader.new)
Rake.application.add_import("samp... -
Rake
:: MakefileLoader # load(filename) (6.0) -
与えられた Makefile をロードします。
...ile での記載例とする
require "rake/loaders/makefile"
task default: :test_rake_app
open "sample.mf", "w" do |io|
io << <<-'SAMPLE_MF'
# Comments
a: a1 a2 a3 a4
b: b1 b2 b3 \
b4 b5 b6\
# Mid: Comment
b7
a : a5 a6 a7
c: c1
d: d1 d2 \
e f : e1 f1
g\ 0: g1 g\ 2 g\ 3 g4
SAMPLE_MF
end
ta...