Sha256: abea57b8cd611e9799959237f9b99327ec529b6da2604026dfe0d217bc2cdca3

Contents?: true

Size: 560 Bytes

Versions: 5

Compression:

Stored size: 560 Bytes

Contents

# encoding: UTF-8

module Spontaneous
  class Layout < Style
    def try_paths
      [["layouts", prototype.name.to_s]]
    end

    class Default < Layout
      def try_paths
        [["layouts", "standard"]]
      end
    end

    class Anonymous
      def initialize(template_proc)
        @template_proc = template_proc
      end

      def template(format = :html)
        @template_proc
      end

      def exists?(format = :html)
        true
      end

      def name
        nil
      end

      def schema_id
        nil
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha7 lib/spontaneous/layout.rb
spontaneous-0.2.0.alpha6 lib/spontaneous/layout.rb
spontaneous-0.2.0.alpha5 lib/spontaneous/layout.rb
spontaneous-0.2.0.alpha4 lib/spontaneous/layout.rb
spontaneous-0.2.0.alpha3 lib/spontaneous/layout.rb