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_hash_digest.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_hash_digest.rb')
-rw-r--r-- | lib/sisu/develop/ao_hash_digest.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/sisu/develop/ao_hash_digest.rb b/lib/sisu/develop/ao_hash_digest.rb index 97087a2a..39f34f85 100644 --- a/lib/sisu/develop/ao_hash_digest.rb +++ b/lib/sisu/develop/ao_hash_digest.rb @@ -103,9 +103,8 @@ module SiSU_AO_Hash #use md5 or to create hash of each ao object including ocn, & add into to each ao object end def endnote_digest(data) - t_o_bit=[] - data.each do |en_plus| - t_o_bit <<= case en_plus + data.each.map do |en_plus| + case en_plus when /#{Mx[:en_a_o]}|#{Mx[:en_b_o]}/ if en_plus =~/#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/ t_o_txt,en_open,en_txt,en_close= @@ -133,8 +132,7 @@ module SiSU_AO_Hash end else en_plus end - end - t_o_bit.join + end.join end def stamped(t_o,hash_class) #decide what hash information is most useful, is compromise necessary? t_o.obj=SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_extra_spaces |