Exception: QueryStream::NoResultWarning

Inherits:
Warning
  • Object
show all
Defined in:
lib/query_stream/errors.rb

Overview

一件検索で0件ヒット

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, query: nil, location: nil) ⇒ NoResultWarning

Returns a new instance of NoResultWarning.



68
69
70
71
72
# File 'lib/query_stream/errors.rb', line 68

def initialize(msg = nil, query: nil, location: nil)
  super(msg || "一件検索で該当なし: #{query}")
  @query    = query
  @location = location
end

Instance Attribute Details

#locationString (readonly)

ソースファイル名と行番号

Returns:

  • (String)

    the current value of location



65
66
67
# File 'lib/query_stream/errors.rb', line 65

def location
  @location
end

#queryString (readonly)

元の QueryStream 記法

Returns:

  • (String)

    the current value of query



65
66
67
# File 'lib/query_stream/errors.rb', line 65

def query
  @query
end