Module: Ecoportal::API::Common::Content::DoubleModel::Modifiers::Rootable

Extended by:
Includer
Defined in:
lib/ecoportal/api/common/content/double_model/modifiers/rootable.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Includer

include_missing

Class Method Details

.included(base) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/ecoportal/api/common/content/double_model/modifiers/rootable.rb', line 11

def included(base)
  super

  include_missing(base, DoubleModel::Parented)

  base.extend ClassMethods
end

Instance Method Details

#rootObject

INSTANCE METHODS



37
38
39
40
41
# File 'lib/ecoportal/api/common/content/double_model/modifiers/rootable.rb', line 37

def root
  return self if root?

  _parent.root
end