Sha256: 672d7dbd0f1ebfb8d7a268c50d1cc46f467b5e478de1657b6072f9186ca0c58c
Contents?: true
Size: 438 Bytes
Versions: 3
Compression:
Stored size: 438 Bytes
Contents
module Orthor class StaticPage include Orthor::HttpCaching include Orthor::MetaData attr_accessor :path dsl_accessor :name, :action, :controller def initialize(path, page_name, &block) @path = path name(page_name) raise "Path required" unless @path instance_eval &block if block_given? end def path_name @path.gsub("/", " ").strip.gsub(/[^a-z0-9]+/i, '_') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
orthorings-0.1.4 | lib/orthor/static_page.rb |
orthorings-0.1.3 | lib/orthor/static_page.rb |
orthorings-0.1.2 | lib/orthor/static_page.rb |