diff options
author | Ralph Amissah <ralph@amissah.com> | 2015-03-19 18:38:21 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2015-03-23 21:46:12 -0400 |
commit | 64dfdccbc0a136aab15c53ef0375244a28895429 (patch) | |
tree | d1cca15d22480dfb9e31765bd6160e72aab0c102 /lib/sisu/develop/ao_character_check.rb | |
parent | d: manifest add html ids to label/identify content (diff) |
d: ao & elsewhere, use of map & select
Diffstat (limited to 'lib/sisu/develop/ao_character_check.rb')
-rw-r--r-- | lib/sisu/develop/ao_character_check.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/sisu/develop/ao_character_check.rb b/lib/sisu/develop/ao_character_check.rb index b7cfc6df..2596c739 100644 --- a/lib/sisu/develop/ao_character_check.rb +++ b/lib/sisu/develop/ao_character_check.rb @@ -63,9 +63,9 @@ module SiSU_AO_CharacterCheck end def character_check_and_oldstyle_endnote_array data=@data - @tuned_file,@endnote_array=[],[] + @endnote_array=[] endnote_no=1 - data.each do |dob| + @tuned_file=data.select do |dob| unless dob.is ==:table dob.obj=dob.obj.strip. gsub(/^[{~}]\s*$/,''). @@ -93,9 +93,8 @@ module SiSU_AO_CharacterCheck end end end - @tuned_file << dob if dob.is_a?(Object) - end - @tuned_file=@tuned_file.flatten.compact + dob if dob.is_a?(Object) + end.flatten.compact [@tuned_file,@endnote_array] end end |