Sha256: 7bf0e9458631a26aab3d069d9ef0ef28508f1f45201463bfa22671868223707e

Contents?: true

Size: 551 Bytes

Versions: 4

Compression:

Stored size: 551 Bytes

Contents

require "erector"
module AlphaSimprini
  class Page < Erector::Widget
    def content
      text :doctype_html
      html do
        head do
          csrf_meta_tag
          title :application_title
          assets
        end
        body do
          body_content
        end
      end
    end
  
    def assets
    end
  
    def copy key
      p t(key)
    end
  
    def text(value)
      if value.is_a? Symbol
        output << h(t(value))
      else
        super
      end
    end
  
    def body_content
      copy :blank
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alpha-simprini-engine-0.0.4 lib/alpha_simprini/page.rb
alpha-simprini-engine-0.0.3 lib/alpha_simprini/page.rb
alpha-simprini-engine-0.0.2 lib/alpha_simprini/page.rb
alpha-simprini-engine-0.0.1 lib/alpha_simprini/page.rb