516件ヒット
[1-100件を表示]
(0.131秒)
別のキーワード
ライブラリ
- ビルトイン (12)
- csv (12)
- erb (24)
- json (108)
-
json
/ add / struct (12) - logger (24)
- optparse (168)
- pathname (48)
-
rake
/ packagetask (12) -
rexml
/ document (84) - socket (12)
クラス
- Addrinfo (12)
- CSV (12)
- ERB (24)
-
JSON
:: Parser (12) -
JSON
:: State (72) - Logger (24)
- Module (12)
- OptionParser (168)
- Pathname (48)
-
REXML
:: Attribute (24) -
REXML
:: Attributes (24) -
REXML
:: DocType (12) -
REXML
:: Element (24) -
Rake
:: PackageTask (12) - Struct (12)
キーワード
- [] (12)
- autoload (12)
- binread (12)
- canonname (12)
-
col
_ sep (12) -
external
_ id (12) - filename (12)
- filename= (12)
- formatter (12)
- namespace (24)
- namespaces (24)
-
object
_ nl (12) -
object
_ nl= (12) - on (144)
- progname (12)
-
program
_ name (12) - source (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - sub (24)
-
to
_ json (36) -
to
_ s (12) -
to
_ string (12) - ver (12)
検索結果
先頭5件
-
Rake
:: PackageTask # name -> String (21321.0) -
バージョン情報を含まないパッケージの名前を返します。
...バージョン情報を含まないパッケージの名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.name # => "sample"
end
//}... -
REXML
:: Attribute # to _ string -> String (12455.0) -
"name='value'" という形式の文字列を返します。
..."name='value'" という形式の文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
e = REXML::Element.new("el")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").to_string # => "ns:r='rval'"
//}... -
OptionParser
# program _ name -> String (12321.0) -
プログラムの名前を文字列で返します。
...字列で返します。
デフォルトは $0 が使われます。
@return プログラムの名前を文字列で返します。
//emlist[例][ruby]{
require "optparse"
OptionParser.new do |opts|
p $0 # => /path/to/filename.rb
p opts.program_name # => filename
end
//}... -
Logger
# progname -> String (12314.0) -
ログに出力するプログラム名を取得します。
...ログに出力するプログラム名を取得します。
//emlist[例][ruby]{
require 'logger'
logger = Logger.new(STDOUT)
logger.progname # => nil
logger.progname = "MyProgName"
logger.progname # => "MyProgName"
//}... -
REXML
:: Attributes # namespaces -> { String => String } (9515.0) -
self の中で宣言されている名前空間の集合を返します。
...空間の prefix をキーとし、URI を値とする
Hash を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='<'/>
</root>
EOS
a = do......c.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"foo"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Element # namespaces -> {String => String} (9515.0) -
self の文脈で定義されている名前空間の情報を返します。
...義されている名前空間を、{ prefix => 識別子 }
というハッシュテーブルで返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new("<a xmlns:x='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>")
doc.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"}
//}... -
Addrinfo
# canonname -> String|nil (9332.0) -
カノニカル名を文字列で返します。
...rinfo.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.or......g:80)>
p list[0].canonname #=> "carbon.ruby-lang.org"... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (9332.0) -
属性の名前空間の URI を返します。
...URI を返します。
URI が定義されていない場合は nil を返します。
@param arg この値を指定すると、その属性の名前空間でなく、arg という名前空間
の URI が返されます。
通常は省略します。
//emlist[][ruby]{
require 'rexm......l/document'
e = REXML::Element.new("el")
e.add_attribute("xmlns:ns", "http://www.example.com/ns")
e.add_attribute("ns:r", "rval")
p e.attributes.get_attribute("r").prefix # => "ns"
p e.attributes.get_attribute("r").namespace # => "http://www.example.com/ns"
//}... -
ERB
# filename -> String (9314.0) -
エラーメッセージを表示する際のファイル名を取得します。
...エラーメッセージを表示する際のファイル名を取得します。
//emlist[例][ruby]{
require 'erb'
filename = 'example.rhtml'
erb = ERB.new(File.read(filename))
erb.filename # => nil
erb.filename = filename
erb.filename # =>"example.rhtml"
//}...