Skip to content

Commit

Permalink
Add constant for parent index
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsawicki committed Jun 12, 2011
1 parent e67505e commit 75760b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion seajects/lib/seajects.rb
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 75760b9

Please sign in to comment.