522件ヒット
[1-100件を表示]
(0.086秒)
別のキーワード
ライブラリ
- ビルトイン (294)
- json (60)
- logger (12)
- optparse (36)
- pathname (48)
- rake (12)
-
rexml
/ document (48) -
rubygems
/ installer (12)
クラス
-
ARGF
. class (12) - Data (6)
-
Gem
:: Installer (12) -
JSON
:: State (36) - Logger (12)
- MatchData (60)
- Module (216)
- OptionParser (36)
- Pathname (48)
-
REXML
:: Attribute (24) -
REXML
:: Attributes (24) -
Rake
:: Application (12)
キーワード
- [] (60)
- attr (36)
-
attr
_ accessor (12) -
attr
_ reader (12) -
attr
_ writer (12) - autoload (12)
- binread (12)
-
const
_ source _ location (12) -
deprecate
_ constant (12) -
formatted
_ program _ filename (12) - formatter (12)
- inspect (3)
- names (12)
- namespace (12)
- namespaces (12)
-
object
_ nl (12) - on (36)
- path (12)
- private (48)
-
private
_ class _ method (24) -
private
_ constant (12) -
private
_ method _ defined? (12) -
remove
_ const (12) - space (12)
-
space
_ before (12) - sub (24)
-
to
_ json (24) -
to
_ s (15) -
to
_ string (12)
検索結果
先頭5件
-
Rake
:: Application # name -> String (21321.0) -
アプリケーションの名前を返します。通常は 'rake' という名前を返します。
...アプリケーションの名前を返します。通常は 'rake' という名前を返します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
Rake.application.name # => "rake"
end
//}... -
Gem
:: Installer # formatted _ program _ filename(filename) -> String (12534.0) -
Ruby のコマンドと同じプレフィックスとサフィックスを付けたファイル名を返します。
...
Ruby のコマンドと同じプレフィックスとサフィックスを付けたファイル名を返します。
@param filename 実行ファイルのファイル名を指定します。... -
MatchData
# names -> [String] (12314.0) -
名前付きキャプチャの名前を文字列配列で返します。
...前を文字列配列で返します。
self.regexp.names と同じです。
//emlist[例][ruby]{
/(?<foo>.)(?<bar>.)(?<baz>.)/.match("hoge").names
# => ["foo", "bar", "baz"]
m = /(?<x>.)(?<y>.)?/.match("a") # => #<MatchData "a" x:"a" y:nil>
m.names # => ["x", "y"]
//}... -
REXML
:: Attributes # namespaces -> { String => String } (9415.0) -
self の中で宣言されている名前空間の集合を返します。
...。
//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 = doc.get_elements("/root/a").first
p doc.root.attributes.namespaces
# => {"fo......o"=>"http://example.org/foo", "bar"=>"http://example.org/bar"}
p a.attributes.namespaces
# => {}
//}... -
REXML
:: Attribute # to _ string -> String (9337.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'"
//}... -
REXML
:: Attribute # namespace(arg = nil) -> String | nil (9314.0) -
属性の名前空間の URI を返します。
...略します。
//emlist[][ruby]{
require 'rexml/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.c... -
Pathname
# sub(pattern) {|matched| . . . } -> Pathname (6543.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...い Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/usr....../bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub... -
Module
# const _ source _ location(name , inherited = true) -> [String , Integer] (6449.0) -
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
...
name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。
@param name Symbol,String で定数の名前を指定します。
@param inherited true を指定するとスーパークラスや include したモジュールで定義され......。
//emlist[例][ruby]{
# test.rb:
class A # line 1
C1 = 1
C2 = 2
end
module M # line 6
C3 = 3
end
class B < A # line 10
include M
C4 = 4
end
class A # 継続して A を定義する
C2 = 8 # 定数を再定義する
end
p B.const_source_location('C4')......st_source_location('C3') # => ["test.rb", 7]
p B.const_source_location('C1') # => ["test.rb", 2]
p B.const_source_location('C3', false) # => nil -- include したモジュールは検索しない
p A.const_source_location('C2') # => ["test.rb", 16] -- 最後に定... -
Pathname
# sub(pattern , replace) -> Pathname (6443.0) -
self を表現するパス文字列に対して sub メソッドを呼び出し、その結果を内 容とする新しい Pathname オブジェクトを生成し、返します。
...い Pathname オブジェクトを生成し、返します。
@param pattern 置き換える文字列のパターンを指定します。
@param replace pattern で指定した文字列と置き換える文字列を指定します。
//emlist[例][ruby]{
require 'pathname'
path1 = Pathname('/usr....../bin/perl')
path1.sub('perl', 'ruby') #=> #<Pathname:/usr/bin/ruby>
//}
@see String#sub...