Exception: FixtureFox::ParseError

Inherits:
Error
  • Object
show all
Defined in:
lib/fixture_fox/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, lineno, pos, msg) ⇒ ParseError

Returns a new instance of ParseError.



11
12
13
14
15
16
# File 'lib/fixture_fox/error.rb', line 11

def initialize(file, lineno, pos, msg)
  super(msg)
  @file = file
  @lineno = lineno
  @pos = pos
end

Instance Attribute Details

#fileObject (readonly)

Returns the value of attribute file.



7
8
9
# File 'lib/fixture_fox/error.rb', line 7

def file
  @file
end

#linenoObject (readonly)

Returns the value of attribute lineno.



8
9
10
# File 'lib/fixture_fox/error.rb', line 8

def lineno
  @lineno
end

#posObject (readonly)

Returns the value of attribute pos.



9
10
11
# File 'lib/fixture_fox/error.rb', line 9

def pos
  @pos
end

Instance Method Details

#error_messageObject



18
19
20
# File 'lib/fixture_fox/error.rb', line 18

def error_message()
  [file, lineno, pos].compact.join(":") + " " + message
end