class Object

Public Instance Methods

save_json( path, data ) click to toggle source

helpers

# File lib/hubba.rb, line 8
def save_json( path, data )    ## data - hash or array
  File.open( path, 'w:utf-8' ) do |f|
    f.write( JSON.pretty_generate( data ))
  end
end
save_yaml( path, data ) click to toggle source
# File lib/hubba.rb, line 14
def save_yaml( path, data )
  File.open( path, 'w:utf-8' ) do |f|
    f.write( data.to_yaml )
  end
end