別のキーワード
ライブラリ
- ビルトイン (1209)
- csv (72)
- erb (60)
-
irb
/ cmd / help (12) -
irb
/ cmd / load (36) - json (84)
- logger (36)
- optparse (156)
- ostruct (14)
- pathname (217)
- rake (48)
- resolv (12)
-
rexml
/ document (204) - rubygems (12)
- win32ole (36)
クラス
- BasicObject (96)
- Binding (12)
-
CSV
:: Row (24) -
CSV
:: Table (48) - Data (9)
- ERB (60)
-
IRB
:: ExtendCommand :: Help (12) -
IRB
:: ExtendCommand :: Load (12) -
IRB
:: ExtendCommand :: Require (12) -
IRB
:: ExtendCommand :: Source (12) -
JSON
:: Parser (12) -
JSON
:: State (24) - Logger (36)
- MatchData (22)
- Method (24)
- Module (456)
- Object (156)
- OpenStruct (14)
- OptionParser (156)
- Pathname (217)
-
REXML
:: Attribute (24) -
REXML
:: Attributes (84) -
REXML
:: DocType (12) -
REXML
:: Element (72) -
REXML
:: Elements (12) -
Rake
:: FileList (12) -
Rake
:: InvocationChain (24) -
Rake
:: TaskArguments (12) -
Resolv
:: DNS :: Name (12) - String (192)
- Struct (61)
- Symbol (5)
- Thread (32)
- TracePoint (24)
- UnboundMethod (24)
- WIN32OLE (24)
-
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (96)
-
JSON
:: Generator :: GeneratorMethods :: Object (12) - Kernel (48)
キーワード
- % (12)
- == (39)
- === (12)
- JSON (12)
- [] (120)
- []= (12)
-
_ _ send _ _ (24) - absolute? (12)
-
add
_ attributes (12) - append (12)
- attr (12)
-
attr
_ accessor (4) -
attr
_ reader (4) -
attr
_ writer (4) - attribute (12)
-
attributes
_ of (12) - basename (12)
- binread (12)
- bytebegin (2)
- byteend (2)
- byteoffset (6)
-
callee
_ id (12) -
class
_ eval (12) -
class
_ variable _ defined? (12) -
class
_ variable _ get (12) -
class
_ variable _ set (12) -
const
_ defined? (12) -
const
_ get (12) -
const
_ set (12) -
const
_ source _ location (12) - debug (24)
- deconstruct (6)
-
def
_ class (12) -
def
_ method (12) -
def
_ module (12) -
default
_ event _ sources (12) -
define
_ method (24) -
define
_ singleton _ method (24) -
delete
_ all (12) -
delete
_ if (24) - each (36)
-
each
_ attribute (12) -
each
_ element _ with _ attribute (12) -
each
_ element _ with _ text (12) - empty? (9)
- eql? (27)
- eval (12)
-
excluded
_ from _ list? (12) - execute (48)
- fetch (8)
- filename (12)
- filename= (12)
- fnmatch (12)
- formatter (12)
- gem (12)
-
get
_ attribute (12) -
get
_ attribute _ ns (12) - glob (16)
- header? (12)
- include? (12)
- initialize (12)
- inspect (12)
-
instance
_ eval (12) -
instance
_ method (12) - intern (12)
- j (12)
- jj (12)
- key? (12)
- load (12)
- max (48)
- member? (12)
- method (12)
-
method
_ defined? (12) -
method
_ id (12) -
method
_ missing (12) - min (48)
-
module
_ eval (12) -
module
_ function (12) - mountpoint? (12)
-
named
_ captures (12) - namespace (24)
- namespaces (24)
-
object
_ nl (12) - on (144)
-
original
_ name (24) - parse (12)
- private (48)
-
private
_ method _ defined? (12) -
protected
_ method _ defined? (12) - public (48)
-
public
_ class _ method (24) -
public
_ constant (12) -
public
_ instance _ method (12) -
public
_ method (12) -
public
_ method _ defined? (12) -
public
_ send (24) - realdirpath (12)
- realpath (12)
- relative? (12)
-
relative
_ path _ from (12) -
remove
_ class _ variable (12) -
remove
_ const (12) -
remove
_ instance _ variable (12) -
respond
_ to? (12) -
respond
_ to _ missing? (12) - root? (12)
-
ruby2
_ keywords (12) - send (24)
- setproperty (24)
-
singleton
_ method (12) -
singleton
_ method _ added (12) -
singleton
_ method _ removed (12) -
singleton
_ method _ undefined (12) - slice (72)
-
space
_ before (12) - sub (24)
-
sub
_ ext (12) -
subdomain
_ of? (12) -
to
_ a (12) -
to
_ h (24) -
to
_ json (12) -
to
_ s (12) -
to
_ string (12) -
to
_ sym (12) -
undef
_ method (12) - values (12)
検索結果
先頭5件
-
UnboundMethod
# name -> Symbol (21320.0) -
このメソッドの名前を返します。
...このメソッドの名前を返します。
//emlist[例][ruby]{
a = String.instance_method(:size)
a.name # => :size
//}... -
Symbol
# name -> String (21226.0) -
シンボルに対応する文字列を返します。
...シンボルに対応する文字列を返します。
Symbol#to_sと違って freeze された文字列を返します。
//emlist[][ruby]{
p :fred.name # => "fred"
p :fred.name.frozen? # => true
p :fred.to_s # => "fred"
p :fred.to_s.frozen? # => false
//}
@see Symbol#to_s... -
Module
# ruby2 _ keywords(method _ name , . . . ) -> nil (18564.0) -
For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.
...For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument......s will be passed through the method to
other methods.
This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.
This method will probably be removed at some point, as it exists only
for backwards compatibility......ot exist in Ruby versions
before 2.7, check that the module responds to this method before calling
it. Also, be aware that if this method is removed, the behavior of the
method will change so that it does not pass through keywords.
//emlist[例][ruby]{
module Mod
def foo(meth, *args, &block)... -
Method
# name -> Symbol (18320.0) -
このメソッドの名前を返します。
...このメソッドの名前を返します。
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.name # => :foo
//}... -
Pathname
# basename(suffix = "") -> Pathname (15569.0) -
Pathname.new(File.basename(self.to_s, suffix)) と同じです。
...Pathname.new(File.basename(self.to_s, suffix)) と同じです。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
//emli......][ruby]{
require "pathname"
Pathname("ruby/ruby.c").basename #=> #<Pathname:"ruby.c">
Pathname("ruby/ruby.c").basename(".c") #=> #<Pathname:"ruby">
Pathname("ruby/ruby.c").basename(".*") #=> #<Pathname:"ruby">
Pathname("ruby/ruby.exe").basename(".*") #=> #<Pathname:"ruby">
Pathname(......"ruby/y.tab.c").basename(".*") #=> #<Pathname:"y.tab">
//}
@see File.basename... -
Module
# name -> String | nil (15304.0) -
モジュールやクラスの名前を文字列で返します。
...ル / クラスに対しては、name は nil を、それ以外はオブジェクト ID の文字列を返します。
//emlist[例][ruby]{
module A
module B
end
p B.name #=> "A::B"
class C
end
end
p A.name #=> "A"
p A::B.name #=> "A::B"
p A::C.name #=> "A::C"
# 名前のない......モジュール / クラス
p Module.new.name #=> nil
p Class.new.name #=> nil
p Module.new.to_s #=> "#<Module:0x00007f90b09112c8>"
p Class.new.to_s #=> "#<Class:0x00007fa5c40b41b0>"
//}... -
REXML
:: Attributes # get _ attribute _ ns(namespace , name) -> REXML :: Attribute | nil (9542.0) -
namespace と name で特定される属性を返します。
...namespace と name で特定される属性を返します。
namespace で名前空間を、 name で prefix を含まない属性名を
指定します。
指定された属性が存在しない場合は nil を返します。
XML プロセッサが prefix を置き換えてしまった場合......できます。
@param namespace 名前空間(URI, 文字列)
@param name 属性名(文字列)
//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='<'/>......get_elements("/root/a").first
a.attributes.get_attribute_ns("", "att") # => att='<'
a.attributes.get_attribute_ns("http://example.org/foo", "att") # => foo:att='1'
a.attributes.get_attribute_ns("http://example.org/baz", "att") # => nil
a.attributes.get_attribute_ns("http://example.org/foo", "att... -
REXML
:: Attributes # get _ attribute(name) -> Attribute | nil (9442.0) -
name という名前の属性を取得します。
...name という名前の属性を取得します。
name という名前を持つ属性がない場合は nil を返します。
@param name 属性名(文字列)
@see REXML::Attributes#[]
//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
a.attributes.get_attribute("att") # => att='<'
a.attributes.get_attribute("foo:att") # => foo:att='1'
//}... -
Pathname
# glob(pattern , flags=0) -> [Pathname] (9367.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...Pathname オブジェクトの配列として返します。
引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。
ブロックが与えられたときは、ワイルドカードにマッチした Pathname オブ......で Dir.glob の base キーワード引数を使っています。
@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname("ruby-2.4.2").glob("R*.md") #......=> [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
//}
@see Dir.glob
@see Pathname.glob... -
Pathname
# glob(pattern , flags=0) {|pathname| . . . } -> nil (9367.0) -
ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。
...Pathname オブジェクトの配列として返します。
引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。
ブロックが与えられたときは、ワイルドカードにマッチした Pathname オブ......で Dir.glob の base キーワード引数を使っています。
@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します
//emlist[][ruby]{
require "pathname"
Pathname("ruby-2.4.2").glob("R*.md") #......=> [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
//}
@see Dir.glob
@see Pathname.glob...