Class: Safrano::Filter::Parser::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/odata/filter/error.rb

Overview

Parser errors

Constant Summary collapse

HTTP_CODE =
400

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tok, typ, cur) ⇒ Error

Returns a new instance of Error.



29
30
31
32
33
34
35
36
# File 'lib/odata/filter/error.rb', line 29

def initialize(tok, typ, cur)
  @tok = tok
  @typ = typ
  return unless cur

  @cur_val = cur.value
  @cur_typ = cur.class
end

Instance Attribute Details

#cur_typObject (readonly)

Returns the value of attribute cur_typ.



27
28
29
# File 'lib/odata/filter/error.rb', line 27

def cur_typ
  @cur_typ
end

#cur_valObject (readonly)

Returns the value of attribute cur_val.



26
27
28
# File 'lib/odata/filter/error.rb', line 26

def cur_val
  @cur_val
end

#tokObject (readonly)

Returns the value of attribute tok.



24
25
26
# File 'lib/odata/filter/error.rb', line 24

def tok
  @tok
end

#typObject (readonly)

Returns the value of attribute typ.



25
26
27
# File 'lib/odata/filter/error.rb', line 25

def typ
  @typ
end

Class Method Details

.http_codeObject



19
20
21
# File 'lib/odata/filter/error.rb', line 19

def self.http_code
  const_get(:HTTP_CODE)
end