Permalink
Browse files

Add constant for parent index

  • Loading branch information...
1 parent e67505e commit 75760b972dcdff778530f5c8fc948f93f94ea5ce @kevinsawicki committed Jun 12, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 seajects/lib/seajects.rb
View
@@ -74,6 +74,8 @@ def Seajects.to_json(path)
LINE = 2
# Index of element type
TYPE = 3
+ # Index of parent
+ PARENT = 4
attr_reader :path
@@ -124,7 +126,7 @@ def parse_element(sections, roots)
element.type = sections[TYPE]
element.line = parse_line_number sections
- parent = sections[4].to_s
+ parent = sections[PARENT].to_s
if parent.start_with?("class:")
parent = parent[6..-1]
end

0 comments on commit 75760b9

Please sign in to comment.