diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-10-01 15:33:55 -0400 |
commit | 7d4665f60be31a0481416cfc152bac4442cc6e74 (patch) | |
tree | 295a7c81ace0792ab5a32427cdbb9c6b8e1a6184 /lib/sisu/v3/html_format.rb | |
parent | v3: vim, ftplugin/sisu.vim (diff) |
v3: cosmetic code, true ? x : y
Diffstat (limited to 'lib/sisu/v3/html_format.rb')
-rw-r--r-- | lib/sisu/v3/html_format.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/sisu/v3/html_format.rb b/lib/sisu/v3/html_format.rb index 85e47e0b..1b950358 100644 --- a/lib/sisu/v3/html_format.rb +++ b/lib/sisu/v3/html_format.rb @@ -454,9 +454,9 @@ WOK <!- quick ref -!>} 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 links_guide_close insert='' @@ -957,9 +957,9 @@ WOK def headname #check whether used hn=if @t_o.is ==:heading \ and not @t_o.name.empty? #determine use - hn=if @t_o.is ==:heading; %{<a name="h#{@t_o.name}" id="h#{@t_o.name}"></a>} - else %{<a name="#{@t_o.name}" id="#{@t_o.name}"></a>} - end + hn=(@t_o.is ==:heading) \ + ? (%{<a name="h#{@t_o.name}" id="h#{@t_o.name}"></a>}) + : (%{<a name="#{@t_o.name}" id="#{@t_o.name}"></a>}) else nil end hn |