class Obtenir::FileOperations

Public Class Methods

new(file_path, data) click to toggle source
# File lib/obtenir/file_operations.rb, line 5
def initialize(file_path, data)
  @file_path = file_path
  @data = data
end

Public Instance Methods

save?() click to toggle source
# File lib/obtenir/file_operations.rb, line 10
def save?
  f = File.new(@file_path, "w")
  f.write(@data)
  f.close
  true
rescue
  false
end