クラス
キーワード
-
absolute
_ path (1) -
base
_ label (1) - inspect (1)
-
new
_ day (1) -
new
_ hour (1) -
scan
_ full (1) -
search
_ full (1) -
skip
_ blanks? (1) -
skip
_ until (1) -
to
_ s (1)
検索結果
先頭5件
-
StringScanner
# skip(regexp) -> Integer | nil (54715.0) -
スキャンポインタの地点だけで regexp と文字列のマッチを試します。 マッチしたらスキャンポインタを進めマッチした部分文字列の 長さを返します。マッチしなかったら nil を返します。
スキャンポインタの地点だけで regexp と文字列のマッチを試します。
マッチしたらスキャンポインタを進めマッチした部分文字列の
長さを返します。マッチしなかったら nil を返します。
@param regexp マッチに使用する正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
p s.skip(/\w+/) #=> 4
p s.skip(/\w+/) #=> nil
p s.skip(/\s+/) #=> 1
p s.skip(/\w+/) #=... -
CSV
# skip _ blanks? -> bool (36715.0) -
真である場合は、空行を読み飛ばします。
真である場合は、空行を読み飛ばします。
//emlist[例][ruby]{
require "csv"
csv = CSV.new("header1,header2\n\nrow1_1,row1_2")
csv.skip_blanks? # => false
csv.read # => [["header1", "header2"], [], ["row1_1", "row1_2"]]
csv = CSV.new("header1,header2\n\nrow1_1,row1_2", skip_blanks: true)
csv.skip_blanks? # => tr... -
StringScanner
# skip _ until(regexp) -> Integer | nil (36625.0) -
regexp が一致するまで文字列をスキャンします。 マッチに成功したらスキャンポインタを進めて、 スキャン開始位置からマッチ部分の末尾までの部分文字列の長さを返します。 マッチに失敗したら nil を返します。
regexp が一致するまで文字列をスキャンします。
マッチに成功したらスキャンポインタを進めて、
スキャン開始位置からマッチ部分の末尾までの部分文字列の長さを返します。
マッチに失敗したら nil を返します。
@param regexp マッチに使用する正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.scan_until(/str/) # => 8
s.matched # => "str"
s.pos # =>... -
RSS
:: Maker :: ChannelBase :: SkipDaysBase # new _ day (36307.0) -
@todo 新しくdayを作成し,返します.作成された dayはdayリストの最後 に追加されています.
@todo
新しくdayを作成し,返します.作成された
dayはdayリストの最後
に追加されています. -
RSS
:: Maker :: ChannelBase :: SkipHoursBase # new _ hour (36307.0) -
@todo
@todo
新しくhourを作成し,返します.作成された
hourはhourリストの最後
に追加されています. -
Thread
:: Backtrace :: Location # base _ label -> String (18376.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
self が表すフレームの基本ラベルを返します。通常、
Thread::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end
# => init... -
StringScanner
# scan _ full(regexp , s , f) -> object (18358.0) -
スキャンポインタの位置から regexp と文字列のマッチを試します。
スキャンポインタの位置から regexp と文字列のマッチを試します。
マッチに成功すると、s と f の値によって以下のように動作します。
* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばマッチした部分文字列を返します。
* f が false ならばマッチした部分文字列の長さを返します。
マッチに失敗すると s や f に関係なく nil を返します。
このメソッドは s と f の組み合わせにより、
他のメソッドと同等の動作になります。
*... -
StringScanner
# search _ full(regexp , s , f) -> object (18358.0) -
regexp で指定された正規表現とマッチするまで文字列をスキャンします。
regexp で指定された正規表現とマッチするまで文字列をスキャンします。
マッチに成功すると、s と f の値によって以下のように動作します。
* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばスキャン開始位置からマッチした部分の末尾までの部分文字列を返します。
* f が false ならばスキャン開始位置からマッチした部分の末尾までの部分文字列の長さを返します。
マッチに失敗すると s や f に関係なく nil を返します。
このメソッドは s と ... -
Thread
:: Backtrace :: Location # absolute _ path -> String (18358.0) -
self が表すフレームの絶対パスを返します。
self が表すフレームの絶対パスを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.absolute_path
end
# => /path/to/foo.rb
# /path/to/foo.rb
# /path/to/foo.rb
//}
@see... -
Thread
:: Backtrace :: Location # inspect -> String (9076.0) -
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文 字列に変換したオブジェクトを返します。
Thread::Backtrace::Location#to_s の結果を人間が読みやすいような文
字列に変換したオブジェクトを返します。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.inspect
end
# => "path/to/foo.rb:5:in ... -
Thread
:: Backtrace :: Location # to _ s -> String (9076.0) -
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し ます。
self が表すフレームを Kernel.#caller と同じ表現にした文字列を返し
ます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.to_s
end
# => path/to/foo.rb:5:in `initialize'
# path/to/foo...