Sha256: 1008f81491491887c379f6162b2625b49e3c5f06135f09983af03cf48c74a42f

Contents?: true

Size: 423 Bytes

Versions: 1

Compression:

Stored size: 423 Bytes

Contents

module Orthor
  class StaticPage
    include Orthor::HttpCaching
    include Orthor::MetaData

    attr_accessor :path
    dsl_accessor :view, :controller

    def initialize(path, options = {})
      @path = path
      raise ArgumentError, "Path required" unless @path

      options.each { |key, val| send(key, val) }
    end

    def path_name
      @path.gsub("/", " ").strip.gsub(/[^a-z0-9]+/i, '_')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
orthorings-0.4.0 lib/orthor/static_page.rb