class DtkCommon::DSL::FileParser::OutputArray

Public Class Methods

has_required_keys?(hash_el) click to toggle source

can be overwritten

# File lib/dsl/file_parser.rb, line 129
def self.has_required_keys?(hash_el)
  (keys_for_row() - hash_el.keys?).nil?
end

Public Instance Methods

+(output_obj) click to toggle source
Calls superclass method
# File lib/dsl/file_parser.rb, line 116
def +(output_obj)
  if output_obj.kind_of?(OutputArray)
    super
  elsif output_obj.kind_of?(OutputHash)
    super(OutputArray.new(OutputHash))
  elsif output_obj.nil?
    self
  else
    raise Error.new("Unexpected object type (#{output_obj.class})")
  end
end
<<(hash_el) click to toggle source
Calls superclass method
# File lib/dsl/file_parser.rb, line 108
def <<(hash_el)
  bad_keys = hash_el.keys - self.class.keys_for_row()
  unless bad_keys.empty?
    raise Error.new("Illegal keys being inserted in OutputArray (#{bad_keys.join(',')})")
  end
  super
end