lib/shippinglogic/fedex/service.rb in binarylogic-shippinglogic-1.0.8 vs lib/shippinglogic/fedex/service.rb in binarylogic-shippinglogic-1.1.0
- old
+ new
@@ -3,14 +3,11 @@
require "shippinglogic/fedex/response"
require "shippinglogic/fedex/validation"
module Shippinglogic
class FedEx
- class Service
- alias_method :real_class, :class
- instance_methods.each { |m| undef_method m unless m =~ /(^__|^real_class$|^send$|^object_id$)/ }
-
+ class Service < Proxy
include Attributes
include HTTParty
include Request
include Response
include Validation
@@ -23,15 +20,9 @@
self.base = base
super
end
private
- # We undefined a lot of methods at the beginning of this class. The only methods present in this
- # class are ones that we need, everything else is delegated to our target object.
- def method_missing(name, *args, &block)
- target.send(name, *args, &block)
- end
-
# Allows the cached response to be reset, specifically when an attribute changes
def reset_target
@target = nil
end
\ No newline at end of file