Module: Krakow::Utils::Lazy

Includes:
Logging
Included in:
Command, Connection, Consumer, Consumer::Queue, Discovery, Distribution, FrameType, Ksocket, Producer, Producer::Http
Defined in:
lib/krakow/utils/lazy.rb

Overview

Adds functionality to facilitate laziness

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Methods included from Logging

level=, #log

Class Method Details

.included(klass) ⇒ Object

Injects laziness into class

Parameters:

  • klass (Class)


106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/krakow/utils/lazy.rb', line 106

def included(klass)
  klass.class_eval do
    include InstanceMethods
    extend ClassMethods

    class << self

      def inherited(klass)
        klass.set_attributes(self.attributes)
      end

    end
  end
end