lib/keynote/inline.rb in keynote-0.3.1 vs lib/keynote/inline.rb in keynote-1.0.0
- old
+ new
@@ -171,14 +171,14 @@
template
end
private
- def read_template(source_file, line)
+ def read_template(source_file, line_num)
result = ""
- File.foreach(source_file).drop(line).each do |line|
+ File.foreach(source_file).drop(line_num).each do |line|
if line =~ COMMENTED_LINE
result << $1 << "\n"
else
break
end
@@ -226,11 +226,11 @@
@compile_mutex.synchronize do
return if @compiled
compile(view, view.class)
- @source = nil if @virtual_path
+ @source = nil if defined?(@virtual_path) && @virtual_path
@compiled = true
end
end
end
@@ -246,10 +246,10 @@
@compile_mutex.synchronize do
return if @compiled
compile(view.class)
- @source = nil if @virtual_path
+ @source = nil if defined?(@virtual_path) && @virtual_path
@compiled = true
end
end
end