Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
fog-google / lib / fog / dns / google / models / change.rb
Size: Mime:
module Fog
  module DNS
    class Google
      ##
      # Represents a Change resource
      #
      # @see https://developers.google.com/cloud-dns/api/v1/changes
      class Change < Fog::Model
        identity :id

        attribute :kind
        attribute :start_time, :aliases => "startTime"
        attribute :status
        attribute :additions
        attribute :deletions

        DONE_STATE    = "done".freeze
        PENDING_STATE = "pending".freeze

        ##
        # Checks if the change operation is pending
        #
        # @return [Boolean] True if the change operation is pending; False otherwise
        def pending?
          status == PENDING_STATE
        end

        ##
        # Checks if the change operation is done
        #
        # @return [Boolean] True if the change operation is done; False otherwise
        def ready?
          status == DONE_STATE
        end
      end
    end
  end
end