Module: ActsAsHoldable::Holder::ClassMethods

Defined in:
lib/acts_as_holdable/holder.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_holder(_opts = {}) ⇒ Object



11
12
13
14
15
16
17
18
# File 'lib/acts_as_holdable/holder.rb', line 11

def acts_as_holder(_opts = {})
  class_eval do
    has_many :holdings, as: :holder, dependent: :destroy, class_name: '::ActsAsHoldable::Holding'
  end

  include ActsAsHoldable::Holder::InstanceMethods
  extend ActsAsHoldable::Holder::SingletonMethods
end

#holder?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/acts_as_holdable/holder.rb', line 20

def holder?
  false
end