Class: Ooz::Model::Section
Instance Attribute Summary
Attributes inherited from Base::Model
#root
#doc
Instance Method Summary
collapse
Methods inherited from Base::Model
#initialize, #ooze
#as_json, #as_update, build, #changed?, #consolidate!, #initialize, #new_change?, #print, #to_json, #undo!, #update_last_change!
overridable_const, passthrough, passthrough_arr, passthrough_cls
Instance Method Details
#compact? ⇒ Boolean
17
18
19
|
# File 'lib/ooz/model/section.rb', line 17
def compact?
!split?
end
|
#field_ids ⇒ Object
21
22
23
|
# File 'lib/ooz/model/section.rb', line 21
def field_ids
split? ? (left_membrane_ids || []) + (right_membrane_ids || []) : membrane_ids
end
|
#fields ⇒ Object
25
26
27
|
# File 'lib/ooz/model/section.rb', line 25
def fields
collect_from(field_ids, ooze.fields_hash)
end
|
#orphan? ⇒ Boolean
9
10
11
|
# File 'lib/ooz/model/section.rb', line 9
def orphan?
ooze.stages? && stages.empty?
end
|
#split? ⇒ Boolean
13
14
15
|
# File 'lib/ooz/model/section.rb', line 13
def split?
_type == "Enzyme::Flow::SplitNode"
end
|
#stages ⇒ Object
5
6
7
|
# File 'lib/ooz/model/section.rb', line 5
def stages
ooze.stages_by_section[_id] || []
end
|