Class: Hash

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

Direct Known Subclasses

Command, Commands, Environment, MSBuild, Project, Projects

Instance Method Summary collapse

Instance Method Details

#execute(value = nil) ⇒ Object



687
688
689
690
691
692
693
694
695
696
697
698
# File 'lib/dev_commands.rb', line 687

def execute value=nil
	  self.each{|k,v|
  v.update if v.respond_to?(:update)
  if(v.is_a?(Array) && v.length==0)
    self.delete k 
  else
    #puts "executing #{k}"

  v.execute(value) if v.respond_to?(:execute)
  end
	  }
end

#to_htmlObject



699
700
701
702
703
704
705
# File 'lib/dev_commands.rb', line 699

def to_html
  [
  	'<div>',
    map { |k, v| ["<br/><div><strong>#{k}</strong>", v.respond_to?(:to_html) ? v.to_html : "<span>#{v}</span></div><br/>"] },
    '</div>'
  ].join
end