Module: Sunrise::Models::Structure
- Extended by:
- ActiveSupport::Concern
- Included in:
- Structure
- Defined in:
- lib/sunrise/models/structure.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#descendants_count ⇒ Object
48 49 50 |
# File 'lib/sunrise/models/structure.rb', line 48 def descendants_count (right - left - 1) / 2 end |
#moveable? ⇒ Boolean
44 45 46 |
# File 'lib/sunrise/models/structure.rb', line 44 def moveable? new_record? || !root? end |