Sha256: a4372272bc85594ebadf7ff00cef496ca1c1e63e70df9bc1a19de144b942a9e0

Contents?: true

Size: 738 Bytes

Versions: 4

Compression:

Stored size: 738 Bytes

Contents

module Vertebrae
  module Base
    extend Configuration


    def logger
      @@logger ||= Logger.new(STDOUT)
    end

    def logger=(logger)
      @@logger = logger
    end

    class << self
      def logger
        @@logger ||= Logger.new(STDOUT)
      end

      def logger=(logger)
        @@logger = logger
      end
    end

    # implement this in your api
    #
    def new(options = {}, &block)
      raise "implement me!"
    end

    def method_missing(method, *args, &block)
      return super unless new.respond_to?(method)
      new.send(method, *args, &block)
    end

    def respond_to?(method, include_private = false)
      new.respond_to?(method, include_private) || super(method, include_private)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vertebrae-0.1.6 lib/base.rb
vertebrae-0.1.5 lib/base.rb
vertebrae-0.1.4 lib/base.rb
vertebrae-0.1.3 lib/base.rb