るりまサーチ

最速Rubyリファレンスマニュアル検索!
168件ヒット [1-100件を表示] (0.020秒)

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. io seek_end

検索結果

<< 1 2 > >>

JSON::Parser#source -> String (18114.0)

現在のソースのコピーを返します。

...quire 'json'

parser = JSON::Parser.new(DATA.read)
print parser.source

# => {
# => "Tanaka": {
# => "name":"tanaka",
# => "age":20
# => },
# => "Suzuki": {
# => "name":"suzuki",
# => "age":25
# => }
# => }

__END__
{
"Tanaka": {
"name":"tanaka",
"age":20
},
"Su...

Gem::DependencyInstaller#find_gems_with_sources(dep) -> Array (9101.0)

与えられた条件にマッチする Gem::Specification のインスタンスと URI のペアのリストを 返します。

...返します。

Gem はローカル (Dir.pwd) とリモート (Gem.sources) の両方から検索します。
結果は、バージョンの新しい順が先にきます。また、ローカルの Gem も先にきます。

@param dep Gem::Dependency のインスタンスを指定します。...

Module#const_source_location(name, inherited = true) -> [String, Integer] (6192.0)

name で指定した定数の定義を含むソースコードのファイル名と行番号を配列で返します。

...e 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') # => ["test.rb", 12]
p B.const_source_location('C3')...
...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] -- 最後に定義された位置を返す

p Object.const_source_locati...
...を検索する
p Object.const_source_location('A') # => ["test.rb", 1] -- クラスが再定義された場合は最初の定義位置を返す

p B.const_source_location('A') # => ["test.rb", 1] -- Object を継承している為
p M.const_source_location('A') # => ["t...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (6155.0)

型が持つソースインターフェイスを取得します。

...型が持つソースインターフェイスを取得します。

default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるイン...
...ない場合は空配列を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、ここで
返されたイ...
...osoft Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source
= type.default_event_sources[0]
class WebEvent
def initialize
@completed = false
end

attr_reader :completed
end

source
.ole_methods.each do |m|
WebEvent.module_eval do
define_method("on#{m....

Method#source_location -> [String, Integer] | nil (6138.0)

ソースコードのファイル名と行番号を配列で返します。

...す。

@see Proc#source_location

//emlist[例][ruby]{
# ------- /tmp/foo.rb ---------
class Foo
def foo; end
end

# ----- end of /tmp/foo.rb ----

require '/tmp/foo'

m = Foo.new.method(:foo) # => #<Method: Foo#foo>
m.source_location # => ["/tmp/foo.rb", 2]

method(:puts).source_location # => nil...

絞り込み条件を変える

IRB::ExtendCommand::Source#execute(file_name) -> nil (6001.0)

現在の irb インタプリタ上で、 Ruby スクリプト path を評価します。

現在の irb インタプリタ上で、 Ruby スクリプト path を評価します。

path の内容を irb で一行ずつタイプしたかのように、irb 上で一行ずつ評価
されます。$" は更新されず、何度でも実行し直す事ができます。

@param file_name ファイル名を文字列で指定します。

Gem::Commands::DependencyCommand#find_gems(name, source_index) -> Hash (3108.0)

与えられた Gem の名前をインデックスから検索します。

...与えられた Gem の名前をインデックスから検索します。

@param name Gem の名前を指定します。

@param source_index Gem::SourceIndex のインスタンスを指定します。

@see Gem::SourceIndex#search...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (141.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変...
...turn 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_IN...
...どれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begi...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (141.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変...
...turn 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_IN...
...どれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begi...
<< 1 2 > >>