Exception: Nokolexbor::XPath::SyntaxError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/nokolexbor/xpath.rb,
ext/nokolexbor/nl_xpath_context.c

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'lib/nokolexbor/xpath.rb', line 7

def code
  @code
end

#columnObject (readonly)

Returns the value of attribute column.



15
16
17
# File 'lib/nokolexbor/xpath.rb', line 15

def column
  @column
end

#domainObject (readonly)

Returns the value of attribute domain.



6
7
8
# File 'lib/nokolexbor/xpath.rb', line 6

def domain
  @domain
end

#fileObject (readonly)

Returns the value of attribute file.



9
10
11
# File 'lib/nokolexbor/xpath.rb', line 9

def file
  @file
end

#int1Object (readonly)

Returns the value of attribute int1.



14
15
16
# File 'lib/nokolexbor/xpath.rb', line 14

def int1
  @int1
end

#levelObject (readonly)

Returns the value of attribute level.



8
9
10
# File 'lib/nokolexbor/xpath.rb', line 8

def level
  @level
end

#lineObject (readonly)

Returns the value of attribute line.



10
11
12
# File 'lib/nokolexbor/xpath.rb', line 10

def line
  @line
end

#str1Object (readonly)

Returns the value of attribute str1.



11
12
13
# File 'lib/nokolexbor/xpath.rb', line 11

def str1
  @str1
end

#str2Object (readonly)

Returns the value of attribute str2.



12
13
14
# File 'lib/nokolexbor/xpath.rb', line 12

def str2
  @str2
end

#str3Object (readonly)

Returns the value of attribute str3.



13
14
15
# File 'lib/nokolexbor/xpath.rb', line 13

def str3
  @str3
end

Instance Method Details

#error?Boolean

return true if this is an error

Returns:

  • (Boolean)


31
32
33
# File 'lib/nokolexbor/xpath.rb', line 31

def error?
  level == 2
end

#fatal?Boolean

return true if this error is fatal

Returns:

  • (Boolean)


37
38
39
# File 'lib/nokolexbor/xpath.rb', line 37

def fatal?
  level == 3
end

#none?Boolean

return true if this is a non error

Returns:

  • (Boolean)


19
20
21
# File 'lib/nokolexbor/xpath.rb', line 19

def none?
  level == 0
end

#to_sObject



41
42
43
44
45
46
# File 'lib/nokolexbor/xpath.rb', line 41

def to_s
  message = super.chomp
  [location_to_s, level_to_s, message]
    .compact.join(": ")
    .force_encoding(message.encoding)
end

#warning?Boolean

return true if this is a warning

Returns:

  • (Boolean)


25
26
27
# File 'lib/nokolexbor/xpath.rb', line 25

def warning?
  level == 1
end