Sha256: 452c8687c93e1c7b84fd4c4010adc1bccc3764b6c81f380e14b1399d514fd092

Contents?: true

Size: 711 Bytes

Versions: 14

Compression:

Stored size: 711 Bytes

Contents

module Vertebrae
  module Base
    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

14 entries across 14 versions & 1 rubygems

Version Path
vertebrae-0.4.0 lib/base.rb
vertebrae-0.3.1 lib/base.rb
vertebrae-0.3.0 lib/base.rb
vertebrae-0.2.11 lib/base.rb
vertebrae-0.2.10 lib/base.rb
vertebrae-0.2.9 lib/base.rb
vertebrae-0.2.8 lib/base.rb
vertebrae-0.2.7 lib/base.rb
vertebrae-0.2.6 lib/base.rb
vertebrae-0.2.5 lib/base.rb
vertebrae-0.2.4 lib/base.rb
vertebrae-0.2.2 lib/base.rb
vertebrae-0.2.1 lib/base.rb
vertebrae-0.2.0 lib/base.rb