Exception: CodeModels::Ruby::ParsingError

Inherits:
Exception
  • Object
show all
Defined in:
lib/codemodels/ruby/parser.rb

Direct Known Subclasses

UnknownNodeType

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node, msg) ⇒ ParsingError

Returns a new instance of ParsingError.



36
37
38
39
# File 'lib/codemodels/ruby/parser.rb', line 36

def initialize(node,msg)
	@node = node
	@msg = msg
end

Instance Attribute Details

#nodeObject (readonly)

Returns the value of attribute node.



34
35
36
# File 'lib/codemodels/ruby/parser.rb', line 34

def node
  @node
end

Instance Method Details

#to_sObject



41
42
43
# File 'lib/codemodels/ruby/parser.rb', line 41

def to_s
	"#{@msg}, start line: #{@node.position.start_line}"
end