るりまサーチ

最速Rubyリファレンスマニュアル検索!
42件ヒット [1-42件を表示] (0.094秒)
トップページ > クエリ:>[x] > 種類:モジュール[x]

別のキーワード

  1. _builtin >
  2. bigdecimal >
  3. float >
  4. module >
  5. complex >

ライブラリ

キーワード

検索結果

OpenSSL::ASN1 (25.0)

ASN.1(Abstract Syntax Notation One) のデータを取り扱うためのモジュールです。

...er # => "\f\x06foobar"
y.to_der # => "0\x06\x01\x01\xFF\x02\x01\xF4"
z.to_der # => "b\x03\x01\x01\x00"
z2.to_der # => "b\x03\x01\x01\x00" これは z.to_der と同じ
u.to_der # => "C\x01\x00"
# エンコードした文字列をデコード
OpenSSL::ASN1.decode(x.to_der)
# => #<Ope...
...alue="foobar", @tagging=nil, @tag_class=:UNIVERSAL>
OpenSSL::ASN1.decode(y.to_der)
# => #<OpenSSL::ASN1::Sequence:0x000000027c47d0 @tag=16, @value=[#<OpenSSL::ASN1::Boolean:0x000000027c4898 @tag=1, @value=true, @tagging=nil, @tag_class=:UNIVERSAL>, #<OpenSSL::ASN1::Integer:0x000000027c47f8 @tag=...
..._class=:UNIVERSAL>], @tagging=nil, @tag_class=:UNIVERSAL>
OpenSSL::ASN1.decode(z.to_der)
# => #<OpenSSL::ASN1::ASN1Data:0x000000027bc918 @tag=2, @value=[#<OpenSSL::ASN1::Boolean:0x000000027bc968 @tag=1, @value=false, @tagging=nil, @tag_class=:UNIVERSAL>], @tag_class=:APPLICATION>
OpenSSL::ASN1...

NKF (19.0)

nkf(Network Kanji code conversion Filter, https://osdn.net/projects/nkf/) を Ruby から使うためのモジュールです。

...]{
#!/usr/local/bin/ruby

require 'nkf'

CODES = {
NKF::JIS => "JIS",
NKF::EUC => "EUC",
NKF::SJIS => "SJIS",
NKF::UTF8 => "UTF8",
NKF::BINARY => "BINARY",
NKF::ASCII => "ASCII",
NKF::UNKNOWN => "UNKNOWN",
}

while file = ARGV.shift
str = open(file) {|io| io.g...
...‘’“”()[]{}〈〉+−=<$%#&*@
-Z1 X0208空白(いわゆる全角空白)を ASCII の空白に変換する
-Z2 X0208空白(いわゆる全角空白)を ASCII の空白2つに変換する
-Z3 X0208の、<、”、&、を '&gt;', '&lt;', '&quot...
...--fb-skip です。
--prefix <escape character><target character>..
Shift_JIS への変換時に、<target character>に指定した文字が2バイト目に
現われた場合に<escape character>を付加します。<target character>は複数指定できます。
例えば、--pref...

Observable (7.0)

Observer パターンを提供するモジュールです。

...price > @limit
print "+++ #{time.to_s}: Price above #@limit: #{price}\n"
end
end
end

ticker = Ticker.new("MSFT")
WarnLow.new(ticker, 80)
WarnHigh.new(ticker, 120)
ticker.run

# => Current price: 126
# => +++ 2017-11-02 12:09:36 +0900: Price above 120: 126
# => Curr...
...ent price: 102
# => Current price: 87
# => Current price: 121...

Profiler__ (7.0)

プロファイラの実装です。 Profiler__.start_profile 実行から、Profiler__.stop_profile までの 区間の実行コードのプロファイルを取得します。

...Profiler__.start_profile
require 'tk' # このコードのプロファイルが測定される
Profiler__.print_profile(STDOUT)

# =>
% cumulative self self total
time seconds seconds calls ms/call ms/call name
51.64 1.10 1.10...
...0.19 514 0.37 0.37 Module#method_added
6.57 1.80 0.14 1 140.00 140.00 Profiler__.start_profile
4.23 1.89 0.09 15 6.00 10.67 Kernel.extend
3.29 1.96 0.07 15 4.67 4.67 Module#extend_object
3.29 2....
...0.06 28 2.14 2.86 Module#attr
1.88 2.13 0.04 19 2.11 2.11 Module#private
1.41 2.16 0.03 29 1.03 1.38 Module#include
0.94 2.18 0.02 10 2.00 4.00 Module#module_function
0.94 2.20 0....