Exception: SearchSyntax::DuplicateParamError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/search_syntax/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, start:, finish:) ⇒ DuplicateParamError

Returns a new instance of DuplicateParamError.



7
8
9
10
11
12
13
# File 'lib/search_syntax/errors.rb', line 7

def initialize(name:, start:, finish:)
  @name = name
  @start = start
  @finish = finish

  super("Duplicate parameter '#{name}' at position #{start}.")
end

Instance Attribute Details

#finishObject (readonly)

Returns the value of attribute finish.



5
6
7
# File 'lib/search_syntax/errors.rb', line 5

def finish
  @finish
end

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/search_syntax/errors.rb', line 5

def name
  @name
end

#startObject (readonly)

Returns the value of attribute start.



5
6
7
# File 'lib/search_syntax/errors.rb', line 5

def start
  @start
end