aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2014-10-27 17:28:53 +0100
committerErik Michaels-Ober <sferik@gmail.com>2014-11-29 11:53:24 +0100
commitd1374f99bf3090f3e659687c112ed0c5c0865cfb (patch)
treee87455ea620155254511180cc1f08c5544ed195c /guides/rails_guides
parent56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff)
downloadrails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip
Pass symbol as an argument instead of a block
Diffstat (limited to 'guides/rails_guides')
-rw-r--r--guides/rails_guides/kindle.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/rails_guides/kindle.rb b/guides/rails_guides/kindle.rb
index 09eecd5634..32926622e3 100644
--- a/guides/rails_guides/kindle.rb
+++ b/guides/rails_guides/kindle.rb
@@ -70,7 +70,7 @@ module Kindle
File.open("sections/%03d/_section.txt" % section_idx, 'w') {|f| f.puts title}
doc.xpath("//h3[@id]").each_with_index do |h3,item_idx|
subsection = h3.inner_text
- content = h3.xpath("./following-sibling::*").take_while {|x| x.name != "h3"}.map {|x| x.to_html}
+ content = h3.xpath("./following-sibling::*").take_while {|x| x.name != "h3"}.map(&:to_html)
item = Nokogiri::HTML(h3.to_html + content.join("\n"))
item_path = "sections/%03d/%03d.html" % [section_idx, item_idx]
add_head_section(item, subsection)