Sha256: 62803479835106db8c9a453ce7b7d4746079627049486bcb4bb6cd2d4e4754cd

Contents?: true

Size: 1.01 KB

Versions: 17

Compression:

Stored size: 1.01 KB

Contents

require 'semantic_logger'

# Base class for RubySkynet Clients and Services
module RubySkynet
  module Base
    def self.included(base)
      base.extend ClassMethods
      base.class_eval do
        include SemanticLogger::Loggable
      end
    end

    module ClassMethods
      # Name of this service to Register with Skynet
      # Default: class name
      def skynet_name
        @skynet_name ||= name.gsub('::', '.')
      end

      def skynet_name=(skynet_name)
        @skynet_name = skynet_name
      end

      # Version of this service to register with Skynet
      # Default: nil
      def skynet_version
        @skynet_version ||= nil
      end

      def skynet_version=(skynet_version)
        @skynet_version = skynet_version
      end

      # Region within which this service is defined
      # Default: RubySkynet.region
      def skynet_region
        @skynet_region || ::RubySkynet.region
      end

      def skynet_region=(skynet_region)
        @skynet_region = skynet_region
      end

    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ruby_skynet-1.3.0.alpha3 lib/ruby_skynet/base.rb
ruby_skynet-1.3.0.alpha2 lib/ruby_skynet/base.rb
ruby_skynet-1.3.0.alpha1 lib/ruby_skynet/base.rb
ruby_skynet-1.2.7 lib/ruby_skynet/base.rb
ruby_skynet-1.2.6 lib/ruby_skynet/base.rb
ruby_skynet-1.2.5 lib/ruby_skynet/base.rb
ruby_skynet-1.2.4 lib/ruby_skynet/base.rb
ruby_skynet-1.2.3 lib/ruby_skynet/base.rb
ruby_skynet-1.2.2 lib/ruby_skynet/base.rb
ruby_skynet-1.2.1 lib/ruby_skynet/base.rb
ruby_skynet-1.2.0 lib/ruby_skynet/base.rb
ruby_skynet-1.1.1 lib/ruby_skynet/base.rb
ruby_skynet-1.1.0 lib/ruby_skynet/base.rb
ruby_skynet-1.0.0 lib/ruby_skynet/base.rb
ruby_skynet-0.8.1 lib/ruby_skynet/base.rb
ruby_skynet-0.8.0 lib/ruby_skynet/base.rb
ruby_skynet-0.7.0 lib/ruby_skynet/base.rb