Class: DtkCommon::DSL::FileParser::OutputHash
- Inherits:
-
DTK::Common::SimpleHashObject
- Object
- DTK::Common::SimpleHashObject
- DtkCommon::DSL::FileParser::OutputHash
- Defined in:
- lib/dsl/file_parser.rb
Instance Method Summary collapse
Instance Method Details
#+(output_obj) ⇒ Object
140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/dsl/file_parser.rb', line 140 def +(output_obj) if output_obj.kind_of?(OutputArray) OutputArray.new(self) + output_obj elsif output_obj.kind_of?(OutputHash) merge(output_obj) elsif output_obj.nil? self else raise Error.new("Unexpected object type (#{output_obj.class})") end end |
#merge_non_empty!(hash) ⇒ Object
135 136 137 138 |
# File 'lib/dsl/file_parser.rb', line 135 def merge_non_empty!(hash) hash.each{|k,v| merge!(k => v) unless v.nil? or v.empty?} self end |