Sha256: ecc9a643a27821d3360b918704597a55ff50559fef257cbac64909f74628c718

Contents?: true

Size: 787 Bytes

Versions: 7

Compression:

Stored size: 787 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 ooze
            self._parent.ooze
          end

          # @param name [String, Regexp] the `name` of the stage to find.
          # @return [Ecoportal::API::V2::Page::Stage, nil]
          def get_by_name(name)
            self.find do |stage|
              same_string?(stage.name, name)
            end
          end

          #def ordered
          #  self.sort_by.with_index do |stage, index|
          #    [stage.ordering, index]
          #  end
          #end

        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ecoportal-api-v2-0.8.20 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.19 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.18 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.17 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.16 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.15 lib/ecoportal/api/v2/page/stages.rb
ecoportal-api-v2-0.8.14 lib/ecoportal/api/v2/page/stages.rb