Module: Promiscuous::Publisher::Model::Base

Extended by:
ActiveSupport::Concern
Included in:
ActiveRecord, Ephemeral, Mongoid
Defined in:
lib/promiscuous/publisher/model/base.rb

Defined Under Namespace

Modules: ClassMethods, PromiscuousMethodsBase Classes: PromiscuousMethods

Instance Method Summary collapse

Instance Method Details

#promiscuousObject



53
54
55
56
# File 'lib/promiscuous/publisher/model/base.rb', line 53

def promiscuous
  # XXX Not thread safe
  @promiscuous ||= self.class.const_get(:PromiscuousMethods).new(self)
end

#valid?(*args) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
61
62
# File 'lib/promiscuous/publisher/model/base.rb', line 58

def valid?(*args)
  # Validations are not dependencies
  # TODO we should yell if the user is trying to write
  without_promiscuous { super }
end