From 7d4665f60be31a0481416cfc152bac4442cc6e74 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 15:33:55 -0400 Subject: v3: cosmetic code, true ? x : y --- lib/sisu/v3/epub_format.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'lib/sisu/v3/epub_format.rb') diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index c08ae492..06a6d623 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1740,9 +1740,9 @@ WOK end end def links_guide_open(type='horizontal') - if type=='vertical'; links_guide_vertical_open - else links_guide_horizontal_open - end + (type=='vertical') \ + ? links_guide_vertical_open + : links_guide_horizontal_open end def prefix_a end @@ -1853,12 +1853,12 @@ WOK if @format and not @format.empty? if @format=~/^\d:(\S+)/ #need more reliable marker #if @format =~ /#{Rx[:lv]}/ headname=$1 #format[/\d~(\S+)/m,1] - @headname=if headname =~/^[a-zA-Z]/; %{} #consider: h_#{headname} - else %{} - end - @headname=if headname =~/^[a-zA-Z]/; %{} #consider: h_#{headname} - else %{} - end + @headname=(headname =~/^[a-zA-Z]/) \ + ? %{} + : %{} + @headname=(headname =~/^[a-zA-Z]/) \ + ? %{} + : %{} end end elsif t_o.class.inspect =~/Object/ -- cgit v1.2.3