Exception: QueryStream::TemplateNotFoundError

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

Overview

テンプレートファイルが存在しない

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, template_path: nil, query: nil, location: nil, hint: nil) ⇒ TemplateNotFoundError

Returns a new instance of TemplateNotFoundError.



30
31
32
33
34
35
36
# File 'lib/query_stream/errors.rb', line 30

def initialize(msg = nil, template_path: nil, query: nil, location: nil, hint: nil)
  super(msg || "テンプレートファイルが見つかりません: #{template_path}")
  @template_path = template_path
  @query         = query
  @location      = location
  @hint          = hint
end

Instance Attribute Details

#hintString? (readonly)

修正ヒント

Returns:

  • (String, nil)

    the current value of hint



27
28
29
# File 'lib/query_stream/errors.rb', line 27

def hint
  @hint
end

#locationString (readonly)

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

Returns:

  • (String)

    the current value of location



27
28
29
# File 'lib/query_stream/errors.rb', line 27

def location
  @location
end

#queryString (readonly)

元の QueryStream 記法

Returns:

  • (String)

    the current value of query



27
28
29
# File 'lib/query_stream/errors.rb', line 27

def query
  @query
end

#template_pathString (readonly)

期待されたテンプレートパス

Returns:

  • (String)

    the current value of template_path



27
28
29
# File 'lib/query_stream/errors.rb', line 27

def template_path
  @template_path
end