Sha256: f4e3224fde787e645f89accf118bff63723f438ac44dfa2d3d03a37e5cf0eb93
Contents?: true
Size: 570 Bytes
Versions: 6
Compression:
Stored size: 570 Bytes
Contents
require 'base64' require 'pathname' module Fedex class GroundManifest attr_reader :manifest_data, :filename # Initialize Fedex::GroundManifest Object # @param [Hash] options def initialize(options = {}) puts options @filename = options[:filename] @manifest_data = Base64.decode64(options[:manifest][:file]) save end def save return if manifest_data.nil? || filename.nil? full_path = Pathname.new(filename) File.open(full_path, 'wb') do |f| f.write(manifest_data) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems