-
-
Save jeffkreeftmeijer/99ac66a9665ae8cc6b12 to your computer and use it in GitHub Desktop.
Revisions
-
Jeff Kreeftmeijer revised this gist
Dec 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ # Option 3 (brevity) info = publication ? "Title: #{ publication.title } (ID: #{ publication.id })" : 'N/A' # Option 4 (readability) if publication info = "Title: #{ publication.title } (ID: #{ publication.id })" else -
Jeff Kreeftmeijer revised this gist
Dec 16, 2014 . 1 changed file with 9 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,5 +11,12 @@ when nil then puts 'N/A' end # Option 3 (brevity) info = publication ? "Title: #{ publication.title } (ID: #{ publication.id })" : 'N/A' # Option 4 (readbility) if publication info = "Title: #{ publication.title } (ID: #{ publication.id })" else info = 'N/A' end -
Jeff Kreeftmeijer revised this gist
Dec 16, 2014 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,7 @@ info = case publication when Publication then puts "Title: #{ publication.title } (ID: #{ publication.id })" when nil then puts 'N/A' end # Option 3 info = publication ? "Title: #{ publication.title } (ID: #{ publication.id })" : 'N/A' -
André Medeiros revised this gist
Dec 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,5 +8,5 @@ # Option 2 info = case publication when Publication then puts "Title: #{ publication.title } (ID: #{ publication.id })" when nil then puts 'N/A' end -
André Medeiros created this gist
Dec 16, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # Option 1 info = if publication "Title: #{ publication.title } (ID: #{ publication.id })" else 'N/A' end # Option 2 info = case publication when Publication then puts "Title: #{ publication.title } (ID: #{ publication.id })" when nil then puts 'N/A' end