Method: Arrow::Config::ConfigStruct#to_hash

Defined in:
lib/arrow/config.rb

#to_hashObject Also known as: to_h

Return the receiver’s values as a (possibly multi-dimensional) Hash with String keys.



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/arrow/config.rb', line 432

def to_hash
  rhash = {}
  @hash.each {|k,v|
    case v
    when ConfigStruct
      rhash[k] = v.to_h
    when NilClass, FalseClass, TrueClass, Numeric
      # No-op (can't dup)
      rhash[k] = v
    when Symbol
      rhash[k] = v.to_s
    else
      rhash[k] = v.dup
    end
  }
  return rhash
end