Sha256: 720693efefe00930e638b468e90a2f127c513ca35eaaea518ae7520e48ad15d7

Contents?: true

Size: 533 Bytes

Versions: 15

Compression:

Stored size: 533 Bytes

Contents

module Locomotive
  module Wagon

    class SnippetDecorator < Locomotive::Steam::Decorators::TemplateDecorator

      include ToHashConcern

      def id
        slug
      end

      def template
        {}.tap do |translations|
          __getobj__.template_path.translations.each do |locale, _|
            __with_locale__(locale) do
              translations[locale] = self.liquid_source
            end
          end
        end
      end

      def __attributes__
        %i(name slug template)
      end

    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_wagon-2.0.0 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc8 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc7 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc6 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc5 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc4 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc3 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc2 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.rc1 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.beta.2 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.beta.1 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.alpha.3 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.alpha.2 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.alpha.1 lib/locomotive/wagon/decorators/snippet_decorator.rb
locomotivecms_wagon-2.0.0.pre.alpha lib/locomotive/wagon/decorators/snippet_decorator.rb