76件ヒット
[1-76件を表示]
(0.013秒)
クラス
- Method (10)
- Object (22)
-
OpenSSL
:: BN (11) -
OpenSSL
:: X509 :: ExtensionFactory (22) -
Rake
:: FileList (11)
キーワード
- gsub! (11)
-
mod
_ sub (11) - send (22)
-
subject
_ certificate= (11) -
subject
_ request= (11) -
super
_ method (10)
検索結果
先頭5件
-
OpenSSL
:: BN # mod _ sub(other , m) -> OpenSSL :: BN (6126.0) -
(self - other) % m を返します。
...(self - other) % m を返します。
//emlist[][ruby]{
require 'openssl'
OpenSSL::BN.new("27").mod_sub(OpenSSL::BN.new("3"), OpenSSL::BN.new("5")) # => 4
//}
@param other 引く数
@param m 剰余を取る数
@raise OpenSSL::BNError 計算時エラー... -
OpenSSL
:: X509 :: ExtensionFactory # subject _ certificate=(name) (6107.0) -
自身に所有者(subject)の証明書オブジェクトを設定します。
...自身に所有者(subject)の証明書オブジェクトを設定します。
@param cert 設定する証明書(OpenSSL::X509::Certificate)オブジェクト
@see OpenSSL::X509::ExtensionFactory.new... -
OpenSSL
:: X509 :: ExtensionFactory # subject _ request=(req) (6107.0) -
自身に証明書署名要求オブジェクトを設定します。
...自身に証明書署名要求オブジェクトを設定します。
@param req 設定する証明書署名要求(OpenSSL::X509::Request)オブジェクト
@see OpenSSL::X509::ExtensionFactory.new... -
Rake
:: FileList # gsub!(pattern , replace) -> self (6107.0) -
自身に含まれるファイルリストのそれぞれのエントリに対して String#gsub を実行します。 自身を破壊的に変更します。
...に対して String#gsub を実行します。
自身を破壊的に変更します。
//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.gsub!(/\.rb/, ".erb") # => ["test1.erb", "test2.erb", "test3.erb"]
file_list # => ["test1.erb", "test2.erb", "test3.erb"]
end
//}... -
Method
# super _ method -> Method | nil (25.0) -
self 内で super を実行した際に実行されるメソッドを Method オブジェ クトにして返します。
...ethod
//emlist[例][ruby]{
class Super
def foo
"superclass method"
end
end
class Sub < Super
def foo
"subclass method"
end
end
m = Sub.new.method(:foo) # => #<Method: Sub#foo>
m.call # => "subclass method"
m.super_method # => #<Method: Super#foo>
m.super_method.call # => "supercla... -
Object
# send(name , *args) -> object (25.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...るメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def foo() "foo" end
def bar() "bar" end
def baz() "baz" end
end
# 任意のキーとメソッド(の名前)......を呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kern... -
Object
# send(name , *args) { . . . . } -> object (25.0) -
オブジェクトのメソッド name を args を引数に して呼び出し、メソッドの実行結果を返します。
...るメソッド名です。
@param args 呼び出すメソッドに渡す引数です。
//emlist[][ruby]{
p -365.send(:abs) #=> 365
p "ruby".send(:sub,/./,"R") #=> "Ruby"
class Foo
def foo() "foo" end
def bar() "bar" end
def baz() "baz" end
end
# 任意のキーとメソッド(の名前)......を呼び出す
# レシーバは任意(Foo クラスのインスタンスである必要もない)
p Foo.new.send(methods[1]) # => "foo"
p Foo.new.send(methods[2]) # => "bar"
p Foo.new.send(methods[3]) # => "baz"
//}
@see Object#public_send, BasicObject#__send__, Object#method, Kern...