From 6b2c44794b8aeeca96a9b3114b87b3c1df69fd9d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 1 Oct 2012 15:43:19 -0400 Subject: v3: cosmetic code, .is_a?(X) replaces .class==X (& some defined? & nil? tests) --- lib/sisu/v3/db_columns.rb | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lib/sisu/v3/db_columns.rb') diff --git a/lib/sisu/v3/db_columns.rb b/lib/sisu/v3/db_columns.rb index 5ae17707..7c4fa9eb 100644 --- a/lib/sisu/v3/db_columns.rb +++ b/lib/sisu/v3/db_columns.rb @@ -295,7 +295,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.author_detail \ - and @md.creator.author_detail.class==Array \ + and @md.creator.author_detail.is_a?(Array) \ and @md.creator.author_detail.length > 0 txt='' @md.creator.author_detail.each do |h| @@ -366,7 +366,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.editor_detail \ - and @md.creator.editor_detail.class==Array \ + and @md.creator.editor_detail.is_a?(Array) \ and @md.creator.editor_detail.length > 0 txt=@md.creator.editor_detail #dc txt='' @@ -394,7 +394,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.contributor_detail \ - and @md.creator.contributor_detail.class==Array \ + and @md.creator.contributor_detail.is_a?(Array) \ and @md.creator.contributor_detail.length > 0 txt=@md.creator.contributor_detail #dc txt='' @@ -422,7 +422,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.illustrator_detail \ - and @md.creator.illustrator_detail.class==Array \ + and @md.creator.illustrator_detail.is_a?(Array) \ and @md.creator.illustrator_detail.length > 0 txt=@md.creator.illustrator_detail txt='' @@ -450,7 +450,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.photographer_detail \ - and @md.creator.photographer_detail.class==Array \ + and @md.creator.photographer_detail.is_a?(Array) \ and @md.creator.photographer_detail.length > 0 txt=@md.creator.photographer_detail txt='' @@ -478,7 +478,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.translator_detail \ - and @md.creator.translator_detail.class==Array \ + and @md.creator.translator_detail.is_a?(Array) \ and @md.creator.translator_detail.length > 0 txt='' @md.creator.translator_detail.each do |h| @@ -505,7 +505,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.prepared_by_detail \ - and @md.creator.prepared_by_detail.class==Array \ + and @md.creator.prepared_by_detail.is_a?(Array) \ and @md.creator.prepared_by_detail.length > 0 txt=@md.creator.prepared_by_detail txt='' @@ -533,7 +533,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.digitized_by_detail \ - and @md.creator.digitized_by_detail.class==Array \ + and @md.creator.digitized_by_detail.is_a?(Array) \ and @md.creator.digitized_by_detail.length > 0 txt=@md.creator.digitized_by_detail txt='' @@ -561,7 +561,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.audio_detail \ - and @md.creator.audio_detail.class==Array \ + and @md.creator.audio_detail.is_a?(Array) \ and @md.creator.audio_detail.length > 0 txt=@md.creator.audio_detail txt='' @@ -589,7 +589,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.creator.video_detail \ - and @md.creator.video_detail.class==Array \ + and @md.creator.video_detail.is_a?(Array) \ and @md.creator.video_detail.length > 0 txt='' @md.creator.video_detail.each do |h| @@ -1891,7 +1891,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.dgst \ - and @md.dgst.class==Array \ + and @md.dgst.is_a?(Array) \ and @md.dgst[1]=~/\S+/ txt=@md.dgst[1] ["#{name}, ","'#{txt}', "] @@ -2025,7 +2025,7 @@ module SiSU_DbColumns end def tuple t=if defined? @md.dgst_skin \ - and @md.dgst_skin.class==Array \ + and @md.dgst_skin.is_a?(Array) \ and @md.dgst_skin[1]=~/\S+/ txt=@md.dgst_skin[1] txt=special_character_escape(txt) -- cgit v1.2.3