Sha256: c375059dd71ef5d8a9c7b8dd56c6f1bff95237ccd97a7ab6da0f8fa816470452
Contents?: true
Size: 728 Bytes
Versions: 26
Compression:
Stored size: 728 Bytes
Contents
module Ecoportal module API class V2 class Page class Component class LawField < Page::Component embeds_many :snippets, klass: "Ecoportal::API::V2::Page::Component::Law", order_key: :weight def empty? snippets.empty? end def ordered_snippets snippets.sort_by.with_index do |snippet, index| [snippet.weight, index] end end def to_s(delimiter: "\n") ordered_snippets.map(&:to_s).join(delimiter) end end end end end end end require 'ecoportal/api/v2/page/component/law'
Version data entries
26 entries across 26 versions & 1 rubygems