Class: Hash

Inherits:
Object show all
Defined in:
lib/openc3/io/json_rpc.rb,
lib/openc3/config/meta_config_parser.rb

Instance Method Summary collapse

Instance Method Details

#as_json(options = nil) ⇒ Object

:nodoc:



124
125
126
127
128
# File 'lib/openc3/io/json_rpc.rb', line 124

def as_json(options = nil) #:nodoc:
  hash = {}
  self.each {|k,v| hash[k.to_s] = v.as_json(options) }
  hash
end

#to_meta_config_yaml(indentation = 0) ⇒ Object



35
36
37
# File 'lib/openc3/config/meta_config_parser.rb', line 35

def to_meta_config_yaml(indentation = 0)
  Psych.dump(self).split("\n")[1..-1].join("\n#{' ' * indentation}")
end