lib/gcloud/datastore/proto.rb in gcloud-0.6.3 vs lib/gcloud/datastore/proto.rb in gcloud-0.7.0

- old
+ new

@@ -1,6 +1,5 @@ -#-- # Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at @@ -11,28 +10,31 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + require "gcloud/proto/datastore_v1.pb" require "gcloud/datastore/errors" module Gcloud module Datastore # rubocop:disable all ## + # @private + # # Proto is the namespace that contains all Protocol Buffer objects. # # The methods in this module are for convenience in using the # Protocol Buffer objects and as such can change in the future. # Neither the convenience methods nor the Protocol Buffer objects # are not part of the gcloud public API. These methods, and even # this module's existance, may change in the future. # # You have been warned. - module Proto #:nodoc: + module Proto def self.from_proto_value proto_value if !proto_value.timestamp_microseconds_value.nil? microseconds = proto_value.timestamp_microseconds_value self.time_from_microseconds microseconds elsif !proto_value.key_value.nil? @@ -109,11 +111,11 @@ def self.time_from_microseconds microseconds Time.at(microseconds / 1000000, microseconds % 1000000).utc end - #:nodoc: + @private PROP_FILTER_OPS = { "<" => PropertyFilter::Operator::LESS_THAN, "lt" => PropertyFilter::Operator::LESS_THAN, "<=" => PropertyFilter::Operator::LESS_THAN_OR_EQUAL, "lte" => PropertyFilter::Operator::LESS_THAN_OR_EQUAL, @@ -243,10 +245,11 @@ RunQueryRequest.new.tap do |rq| rq.query = query_proto end end - class Key #:nodoc: + # @private + class Key def dup proto_request_body = "" self.encode proto_request_body Key.decode proto_request_body end