Sha256: e43dab8ae1f7833c4b95a6946e7045b44c7b5e8c154a921a0a78c73eeb09773c

Contents?: true

Size: 542 Bytes

Versions: 14

Compression:

Stored size: 542 Bytes

Contents

require 'tamashii/common'
require 'tamashii/agent/config'

module Tamashii
  module Agent
    module Adapter
      class Base
        class << self
          def object(*args, &block)
            current_class.new(*args, &block)
          end

          def current_class
            Config.env == "test" ? fake_class : real_class 
          end

          def real_class
            raise NotImplementedError
          end

          def fake_class
            raise NotImplementedError
          end
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
tamashii-agent-0.3.0 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.8 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.7 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.6 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.5 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.4 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.3 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.1 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.2.0 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.1.11 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.1.10 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.1.9 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.1.8 lib/tamashii/agent/adapter/base.rb
tamashii-agent-0.1.7 lib/tamashii/agent/adapter/base.rb