Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/dev/Array.rb
Direct Known Subclasses
Dev::Cmd::Commit, Dev::Cmd::Compile, Dev::Cmd::Pull, Dev::Cmd::Setup, Dev::Cmd::Test, Dev::Cmd::Update
Instance Method Summary collapse
-
#strip_auto_entries ⇒ Object
remove all auto generated entries.
Instance Method Details
#strip_auto_entries ⇒ Object
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 |