Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/dev/Array.rb

Instance Method Summary collapse

Instance Method Details

#strip_auto_entriesObject

remove all auto generated entries



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dev/Array.rb', line 3

def strip_auto_entries
  keep=Array.new
	self.each { |e| 
if(!e.nil?)
  h=nil
  h=e if e.kind_of?(Hash)
  h=Dev::Environment.s_to_hash(e)
  keep << e if(!h.nil? && (!h.has_key?(:auto) || !h[:auto]))
  keep << e if e.kind_of?(String) && !e.include?('{')
end
	}
	self.clear
	keep.each{|e| self << e}
end