Sha256: 04d05ae286bf951034fffd821bd27bd589c5e7f0ffb11197255707a25b03fea7
Contents?: true
Size: 668 Bytes
Versions: 5
Compression:
Stored size: 668 Bytes
Contents
module Ecoportal module API class V2 class Page class Stages < Common::Content::CollectionModel class_resolver :stage_class, "Ecoportal::API::V2::Page::Stage" self.klass = :stage_class def get_by_name(name) find do |stage| stage.name.strip.downcase == name.to_s.strip.downcase end end def ordered_stages stages.each_with_index.sort_by do |stage, index| (stage.ordering >= 9999) ? [index, index] : [stage.ordering, index] end.map(&:first) end end end end end end
Version data entries
5 entries across 5 versions & 2 rubygems