app/models/behaviors/service.rb
def behavior_class_init
      has_many :service_overrides, :as => :target
      has_many :service_providers, :through => :service_overrides, :source => :service_provider

      class_eval(<<-EOS, __FILE__, __LINE__)
        @@service_relationships = {:parent => :none, :children => :none}
      EOS

      cattr_accessor :service_relationships
    end
# behavior_class_init is automatically run after the class is extended
# and then removed from further use (via undef_method)
behavior_class_init is automatically run after the class is extended
and then removed from further use (via undef_method)
behavior_class_init is automatically run after the class is extended and then removed from further use ( via undef_method )
def behavior_class_init
      has_many :service_overrides, :as => :target
      has_many :service_providers, :through => :service_overrides, :source => :service_provider
      class_eval(<<-EOS, __FILE__, __LINE__)
        @@service_relationships = {:parent => :none, :children => :none}
      EOS
      cattr_accessor :service_relationships
    end
def behavior_class_init has_many :service_overrides , :as => :target has_many :service_providers , :through => :service_overrides , :source => :service_provider class_eval ( <<-EOS , __FILE__ , __LINE__ ) 
        @@service_relationships = {:parent => :none, :children => :none}
       EOS cattr_accessor :service_relationships end
behavior_class_init is automatically run after the class is extended
and then removed from further use (via undef_method)
behavior_class_init is automatically run after the class is extended and then removed from further use ( via undef_method )