Sha256: 466227f978160a5c5a65230505b13f313b893d2c28ebff11f4cef385976873ef

Contents?: true

Size: 773 Bytes

Versions: 12

Compression:

Stored size: 773 Bytes

Contents

module Pione
  module System
    # PioneObject is a base class for PIONE system.
    class PioneObject
      # Checks argument type. Raises a type error if the value is not kind of
      # the type.
      # @param [Object] val
      #   check target
      # @param [Class] klass
      #   expected type
      # @return [void]
      def check_argument_type(val, klass)
        raise TypeError.new(val) unless val.kind_of?(klass)
      end

      # Returns true.
      def ping
        true
      end

      # Returns this object's uuid.
      # @return [String]
      #   UUID string
      def uuid
        @__uuid__ ||= Util::UUID.generate
      end

      # Finalizes this object.
      # @return [void]
      def finalize
        # do nothing
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pione-0.5.0 lib/pione/system/object.rb
pione-0.5.0.alpha.2 lib/pione/system/object.rb
pione-0.5.0.alpha.1 lib/pione/system/object.rb
pione-0.4.2 lib/pione/system/object.rb
pione-0.4.1 lib/pione/system/object.rb
pione-0.4.0 lib/pione/system/object.rb
pione-0.3.2 lib/pione/system/object.rb
pione-0.3.1 lib/pione/system/object.rb
pione-0.3.0 lib/pione/system/object.rb
pione-0.2.2 lib/pione/system/object.rb
pione-0.2.1 lib/pione/system/object.rb
pione-0.2.0 lib/pione/system/object.rb