ad_manager_api/lib/ad_manager_api/ad_manager_api_datetime.rb
def method_missing(name, *args, &block)
      # Restrict time zone related functions from being passed to internal ruby
      # Time attribute, since AdManagerDateTime handles timezones its own way.
      restricted_functions = [:dst?, :getgm, :getlocal, :getutc, :gmt,
          :gmtime, :gmtoff, :isdst, :localtime, :utc]
      if restricted_functions.include? name
        raise NoMethodError, 'undefined method %s for %s' % [name, self]
      end
      result = @time.send(name, *args, &block)
      if result.is_a? Time
        return self.class.new(@api, result, @timezone.identifier)
      else
        return result
      end
    end
def method_missing(name, *args, &block)
      # Restrict time zone related functions from being passed to internal ruby
      # Time attribute, since AdManagerDateTime handles timezones its own way.
      restricted_functions = [:dst?, :getgm, :getlocal, :getutc, :gmt,
          :gmtime, :gmtoff, :isdst, :localtime, :utc]
      if restricted_functions.include? name
        raise NoMethodError, 'undefined method %s for %s' % [name, self]
      end
      result = @time.send(name, *args, &block)
      if result.is_a? Time
        return self.class.new(@api, result, @timezone.identifier)
      else
        return result
      end
    end
When an unrecognized method is applied to AdManagerDateTime, pass it
 through to the internal ruby Time.