Sha256: 464550024ad64c78922d089a9ea8b527cfbca241dc2e49f6be10f538c102a553
Contents?: true
Size: 822 Bytes
Versions: 14
Compression:
Stored size: 822 Bytes
Contents
module Ecoportal module API class V2 class Page class Stage < Common::Content::DoubleModel passkey :id passthrough :patch_ver passthrough :name passarray :subtags, order_matters: false passarray :section_ids passthrough :can def sections sec_ids = section_ids.to_a root.sections.values_at(*sec_ids).select.with_index do |sec, i| puts "Warning: section #{id} points to missing section #{sec_ids[i]}" if !sec fld && (!block_given? || yield(sec)) end.sort_by {|sec| sec.weight} end def attach_section(section) section_ids.insert_one(section.id) end end end end end end
Version data entries
14 entries across 14 versions & 2 rubygems