title: module array output
body: <p>I'm writing a module to add functionality to the FlagShihTzu gem.</p>
  
  <p>Basically it goes through the flags and outputs the keys for the ones assigned to the object. It's working, but I also want to be able to use a block in the view to do things with the output.</p>
  
  <p>The problem is that it's outputting both the array from the module and the output from the block in the view.</p>
  
  <pre><code>module AwesomeFlags
  
    def my_flags(column = nil)
      a = self.flag_mapping
      if column.nil?
        c = a.values.map {|var| var.keys}.flatten
      else
        b = a[column]
        c = Array.[](b.keys).flatten
      end
      c.map {|var| self.send(var) ? "#{var.to_s} " : nil}.compact!
    end
  
  end
  </code></pre>
  
  <p>In the view:</p>
  
  <pre><code>= book_offer.my_flags.each do |flag|
    = flag.titleize
  </code></pre>
  
  <p>What I get is:</p>
  
  <pre><code>Regular Complimentary regular complimentary
  </code></pre>